Part Number Hot Search : 
BTX18 T520AE 47713 4ALVCH16 17000 06000 UPD75 BYV26D
Product Description
Full Text Search
 

To Download TMP19A64C1DXBG Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  32bit tx system risc tx19a family TMP19A64C1DXBG rev1.1 2007.march.16
TMP19A64C1DXBG contents TMP19A64C1DXBG 1. ? overview and features 2. ? pin layout and pin functions 3. ?processor core 4. ?memory map 5. ? clock/standby control 6. ? interrupts 7. ? input/output ports 8. ?external bus interface 9. ? chip selector and wait contoroller 10. ? dma controller (dmac) 11. ? 16-bit timer /event counters (tmrb) 12. ? 32-bit timer (tmrc) 13. ?serial channel (sio) 14. ?serial bus interface (sbi) 15. ? analog/digital converter 16. ? watchdog timer (runaway detection timer) 17. ? backup module (clock timer ,backup ram) 18. ? key-on wakeup 19. ?rom correction function 20. ?security function 21. ? table of special function registers 22. ?electrical characteristics 23. ? notations, precautions and restrictions tmp19a64(rev1.1)-1
tmp19a64c1d tmp19a64(rev1.1)1-1 32-bit risc microprocessor - tx19 family TMP19A64C1DXBG 1. overview and features the tx19 family is a high-performance 32-bit risc pro cessor series that toshiba originally developed by integrating the mips16 tm ase (application specific extension), which is an extended instruction set of high code efficiency. tmp19a64 is a 32-bit risc microprocessor with a tx19a processor core and various peripheral functions integrated into one package. it can operate at low voltage with low power consumption. features of tmp19a64 are as follows: (1) tx19a processor core 1) improved code efficiency and operating performance have been realized through the use of two isa (instruction set architecture) modes - 16- and 32-bit isa modes. ? the 16-bit isa mode instructions are compatible with the mips16e-tx instructions of superior code efficiency at the object level. ? the 32-bit isa mode instructions are compatible w ith the tx39 instructions of superior operating performance at the object level. 2) both high performance and low power consumption have been achieved. restrictions on product use 070122ebp ? the information contained herein is s ubject to change without notice. 021023_d ? toshiba is continually working to improve the quality and re liability of its products. nevertheless, semiconductor devices in general can malfunction or fail due to their inherent electrical sensitivity and vulner ability to physical stress. it is the re sponsibility of the buyer, when utilizing toshiba products, to comply with th e standards of safety in making a safe design for the entire system, and to avoid situations in which a malfunction or failu re of such toshiba products could cause loss of human life, bodily injury or damage to property. in developing your designs, please ensure that toshiba products are used within specified operating ranges as set forth in the most recent toshiba products specifications. also, please keep in mind the precautions and conditions set forth in the ?handling guide for semiconductor devices,? or ?tos hiba semiconductor reliability handbook? etc. 021023_a ? the toshiba products listed in this document are intended for usage in general electronics appl ications (computer, personal equipment, office equipment, meas uring equipment, industrial robotics, domestic appliances, etc.). these toshiba products are neither intended nor warranted for usage in equipment that requires extraordinarily high quality and/or reliability or a malfunction or failure of which may cause loss of human life or bodily injury (?unintended usage?). unintended usage include atomic energy control instruments, airplane or spaceship instru ments, transportation instruments, traffic signal instruments, combustion control instruments, medical instruments, all types of safety devices, etc. unintended usage of toshiba products listed in this document shall be made at the customer?s own risk. 021023_b ? the products described in this document shall not be used or embedded to any downstream products of which manufacture, use and/or sale are prohibited under any applicable laws and regulations. 060106_q ? the information contained herein is presented only as a guide for the applications of our products. no responsibility is assum ed by toshiba for any infringements of patents or other rights of th e third parties which may result from its use. no license is granted by implication or otherwise under any patents or other rights of toshiba or the third parties. 070122_c ? the products described in this document are subjec t to foreign exchange and foreign trade control laws. 060925_e ? for a discussion of how the reliability of microcontrollers c an be predicted, please refer to section 1.3 of the chapter entit led quality and reliability assurance/handling precautions. 030619_s
tmp19a64c1d tmp19a64(rev1.1)1-2 z high performance ? almost all instructions can be executed with one clock. ? high performance is possible via a th ree-operand operation instruction. ? 5-stage pipeline ? built-in high-speed memory ? dsp function: a 32-bit multiplication and accumulation operation can be executed with one clock. z low power consumption ? optimized design using a low power consumption library ? standby function that stops the op eration of the processor core 3) high-speed interrupt response suitable for real-time control ? independency of the entry address ? automatic generation of factor -specific vector addresses ? automatic update of interrupt mask levels  (2) on chip program memory and data memory product name on chip rom on chip ram tmp19a64f20axbg 2 mbytes (flash) 64 kbytes TMP19A64C1DXBG 1.5 mbytes 56 kbytes ? rom correction function: 1 word 8 blocks, 8 words 4 blocks ? backup ram: 512 bytes (3) external memory expansion ? 16-mbyte qhhejkrcfftguuhqteqfgcpffcvg ? external data bus: separate bus/multiplexed bus : dynamic bus sizing for 8- and 16-bit widths ports. ? chip select/wait controller : 6 channels (4) dma controller : 8 channels ? data to be transferred to internal memory, in ternal i/o, external memory, and external i/o (5) 16-bit timer : 11 channels ? 16-bit interval timer mode ? 16-bit event counter mode ? 16-bit ppg output ? event capture function ? 2-phase pulse input counter function (1 channel assigned to perform this function): multiplication-by-4 mode (6) 32-bit timer ? 32-bit input capture register : 4 channels ? 32-bit compare register : 10 channels ? 32-bit time base timer : 1 channel (7) clock timer : 1 channel (8) general-purpose serial interface: 7 channels ? either uart mode or synchronous mode can be selected.
tmp19a64c1d tmp19a64(rev1.1)1-3 (9) serial bus interface : 1 channel ? either i 2 c bus mode or clock synchronous mode can be selected (10) 10-bit a/d converter with (s/h) : 24 channels ? conversion speed: 54 clocks (7.85 s@54 mhz) ? start by an internal timer trigger ? fixed channel/scan mode ? single/repeat mode ? high-priority conversion mode ? timer monitor function (11) watchdog timer : 1 channel (12) interrupt source ? cpu: 2 factors ............. software interrupt instruction ? internal: 50 factors....... the order of precedence can be set over 7 levels (except the watchdog timer interrupt). ? external: 20 factors...... the order of precedence can be set over 7 levels (except the nmi interrupt). because 8 factors are associated w ith kwup, the number of interrupt factors is one. (13) 209 pins input/output ports (14) standby mode ? 4 standby modes (idle, sleep, stop and backup) (15) clock generator ? on-chip pll (multiplication by 4) ? clock gear function: the high-speed clock can be divided into 8/8, 7/8, 6/8, 5/8, 4/8, 2/8 or 1/8. ? sub-clock: slow, sleep and backup modes (32.768 khz) (16) endian: bi-endian (big-endian/little-endian) (17) maximum operating frequency ? 54 mhz (pll multiplication) (18) operating voltage range core: 1.35 v to 1.65 v i/o: 1.65 v to 3.3 v adc: 2.7 v to 3.3 v backup block : 2.3 v to 3.3 v (under normal operating conditions) : 1.8 v to 3.3 v (in backup mode) (19) package ? p-fbga281 (13 mm 13 mm, 0.65 mm pitch)
tmp19a64c1d tmp19a64(rev1.1)1-4 tx19 processor core tx19a cpu mac ejtag 1.5-mbyte flash 56-kbyte ram rom correction dmac ( 8ch ) cg intc ebif i/o bus i/f 16-bit tmrb 0 to a ( 11ch ) 32-bit tmrc tbt (1ch) 32-bit tmrc input capture 0 to 3 ( 4ch ) 32-bit tmrc compare 0 to 9 ( 10ch ) 10-bit adc (24ch) sio/uart 0 to 6 ( 7ch ) i2c/sio ( 1ch ) port0 to port6 (also function as external bus i/f) wdt kwup 0 to 7 (8ch) port7 to port9 (also function to receive adc inputs) porta to portk, porto (also function as functional pins) portl to portn portp to portq (general-purpose ports) backup block clock timer (1ch) backup ram (512 bytes) fig. 1-1 TMP19A64C1DXBG block diagram
tmp19a64c1d tmp19a64(rev1.1)2-1 2. pin layout and pin functions 2.1 pin layout fig. 2.1.1 shows the pin layout of tmp19a64. fig. 2.1.1 pin layout diagram (p-fbga281) a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 10 a 11 a 12 a 13 a 14 a 15 a 16 a 17 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 b16 b17 b18 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16 c17 c18 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 e1 e2 e3 e4 e5 e6 e7 e8 e9 e10 e11 e12 e13 e14 e15 e16 e17 e18 f1 f2 f3 f4 f5 f7 f8 f9 f10 f11 f12 f14 f15 f16 f17 f18 g1 g2 g3 g4 g5 g6 g13 g14 g15 g16 g17 g18 h1 h2 h3 h4 h5 h6 h13 h14 h15 h16 h17 h18 j1 j2 j3 j4 j5 j6 j13 j14 j15 j16 j17 j18 k1 k2 k3 k4 k5 k6 k13 k14 k15 k16 k17 k18 l1 l2 l3 l4 l5 l6 l13 l14 l15 l16 l17 l18 m1 m2 m3 m4 m5 m6 m13 m14 m15 m16 m17 m18 n1 n2 n3 n4 n5 n7 n8 n9 n10 n11 n12 n14 n15 n16 n17 n18 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 u1 u2 u3 u4 u5 u6 u7 u8 u9 u10 u11 u12 u13 u14 u15 u16 u17 u18 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 v13 v14 v15 v16 v17 table 2.1.2 shows the pin numbers and names of tmp19a64. table 2.1.2 pin numbers and names (1 of 2) pin no. pin name pin no. pin name pin no. pin name pin no. pin name pin no. pin name a1 n.c. a13 pn2 b8 p75/an5 c2 pcst3 (ejtag) c14 pm7 a2 vrefl a14 pn0 b9 pl0 c3 p92/an18 c15 pm3 a3 p90/an16 a15 pm5 b10 pl3 c4 p95/an21 c16 pk3/key3 a4 p93/an19 a16 pm1 b11 po5/txd6 c5 p82/an10 c17 cvcc15 a5 p80/an8 a17 x2 b12 po1/int1 c6 p85/an13 c18 xt2 a6 p83/an11 b1 avcc31 b13 pn3 c7 p72/an2 d1 tdo (ejtag) a7 p70/an0 b2 vrefh b14 pn1 c8 avss d2 pcst2 (ejtag) a8 p74/an4 b3 p91/an17 b15 pm4 c9 pl1 d3 dint (ejtag) a9 po7/sclk6/cts6 b4 p94/an20 b16 pm0 c10 pl4 d4 dvcc15 a10 pl2 b5 p81/an9 b17 cvss/bvss c11 po4/int4 d5 p96/an22 a11 po6/rxd6 b6 p84/an12 b18 x1 c12 pn6 d6 p86/an14 a12 po0/int0 b7 p71/an1 c1 pcst0 (ejtag) c13 pn4 d7 p73/an3
tmp19a64c1d tmp19a64(rev1.1)2-2 table 2.1.1 pin numbers and names (2 of 2) pin no. pin name pin no. pin name pin no. pin name pin no. pin name pin no. pin name d8 dvcc15 f18 p46/scout k14 pi1/int1 n18 p14/d12/ad12/a12 t8 pd4/txd4 d9 dvss g1 reset k15 pi3/int3 p1 pe4 t9 pc0/txd0 d10 pl5 g2 tdi (ejtag) k16 pi4/int4 p2 pa2/tb0out t10 pc3/txd1 d11 po3/int3 g3 fvcc15 k17 dvcc30 p3 pa3/tb1in0/int7 t11 ph4/tcout8 d12 pn7 g4 dvss k18 pi2/int2 p4 pa4/tb1in1/int8 t12 ph6 d13 pn5 g5 tovr/tsta (ejtag) l1 fvcc3 p5 pa5/tb1out t13 p53/a3 d14 pm2 g6 bw0 l2 pq1/tpd1/tpc1 (ejtag) p6 pb6/tbain0 t14 p61/a9 d15 dvcc34 g13 pk7/key7 l3 pq2/tpd2/tpc2 (ejtag) p7 pg2/tc2in t15 p21/a17/a1/a17 d16 pk2/key2 g14 breset l4 pq3/tpd3/tpc3 (ejtag) p8 pd6/sclk4/cts4 t16 p23/a19/a3/a19 d17 pk4/key4 g15 p41/cs1 l5 pe6/inta p9 pc2/sclk0/cts0 t17 p00/d0/ad0 d18 xt1 g16 p37/ale l6 pe7/intb p10 pc5/sclk1/cts1 t18 p01/d1/ad1 e1 dclk (ejtag) g17 p35/busak l13 p13/ d11/ad11/a11 p11 p52/a2 u1 pb4/tb8out e2 pcst1 (ejtag) g18 fvcc15 l14 p17/d 15/ad15/a15 p12 p62/a10 u2 pb3/tb7out e3 trst (ejtag) h1 nmi l15 fv cc15 p13 p65/a13 u3 pb7/tbain1 e4 pcst4 (ejtag) h2 dvcc31 l16 pi0/int0 p14 p26/a22/a6/a22 u4 pf1/si/scl e5 endian h3 pp7/tpd7 (ejtag) l17 p 45/cs5 p15 p02/d2/ad2 u5 pf5/dreq3 e6 p97/an23 h4 bw1 l18 pj3/dack3 p16 p10/d8/ad8/a8 u6 pg1/tc1in e7 p87/an15 h5 plloff m1 pq0/tpd0/tpc0 (ejtag) p17 p12/d10/ad10/a10 u7 pd2/rxd3 e8 p76/an6 h6 tck (ejtag) m2 pq7/tpd7/tpc7 (ejtag) p18 p11/d9/ad9/a9 u8 dvcc32 e9 p77/an7 h13 test1 m3 pq4/tpd4/tpc4 (ejtag) r1 pa0/tb0in0/int5 u9 pc7/rxd2 e10 pl6 h14 p31/wr m4 pe3 r2 pa1/tb0in1/int6 u10 ph1/tcout5 e11 pl7 h15 p32/hwr m5 pa7/tb3out r3 pf3/dreq2 u11 ph5/tcout9 e12 pm6 h16 p33/wait/rdy m6 dvcc32 r4 pf4/dack2 u12 p50/a0 e13 pk6/key6 h17 p30/rd m13 p06/ d6/ad6 r5 pf7/tbtin u13 p55/a5 e14 pk5/key5 h18 p40/cs0 m14 p07/ d7/ad7 r6 pg7/tcout3 u14 dvcc33 e15 bvcc j1 pp2/tpd2 (ejtag) m15 dvss r7 pg4/tcout0 u15 p64/a12 e16 pk1/key1 j2 pp3/tpd3 (ejtag) m16 pj0/ dreq2 r8 pd5/rxd4 u16 p20/a16/a0/a16 e17 pk0/key0 j3 pp4/tpd4 (ejtag) m17 pj2/ dreq3 r9 pc1/rxd0 u17 p24/a20/a4/a20 e18 dvcc15 j4 pp5/tpd5 (ejtag) m18 pj1/dack2 r10 pc4/rxd1 u18 fvcc3 f1 dvss j5 pp6/tpd6 (ejtag) n1 pe5 r11 ph3/tcout7 v2 pb5/tb9out f2 tms (ejtag) j6 fvcc15 n2 pe0/ txd5 r12 p51/a1 v3 pg0/tc0in f3 eje (ejtag) j13 dvss n3 pe2/sclk5/cts5 r13 p57/a7 v4 pf0/so/sda f4 busmd j14 p47 n4 pe1/rxd5 r14 p66/a14 v5 pg3/tc3in f5 boot j15 n.c. n5 pa6/tb2out r15 p25/a21/a5/a21 v6 pg6/tcout2 f7 avss j16 p44/cs4 n7 dvss r16 p03/d3/ad3 v7 pd1/txd3 f8 avss j17 p36/ r/w n8 pd7/int9 r17 p04/d4/ad4 v8 pd0/sclk2/cts2 f9 avcc32 j18 p34/busrq n9 dvcc15 r18 p05/d5/ad5 v9 pc6/txd2 f10 dvcc34 k1 pp0/tpd0 (ejtag) n10 dvss t1 pb0/tb4out v10 ph2/tcout6 f11 po2/int2 k2 pp1/tpd1 (ejtag) n11 p 56/a6 t2 pb1/tb5out v11 ph0/tcout4 f12 dvss k3 pq5/tpd5/tpc5 (ejtag) n12 dvss t3 pb2/tb6out v12 ph7 f14 bupmd k4 pq6/tpd6/tpc6 (ejtag) n14 p27/a23/a7/a23 t4 pf2/sck v13 p54/a4 f15 p42/cs2 k5 dvss n15 p15/d13/ad13/a13 t5 pf6/dack3 v14 p60/a8 f16 p43/cs3 k6 dvss n16 test3 t6 pg5/tcout1 v15 p63/a11 f17 dvcc33 k13 test2 n17 p16/d14/ad14/ a14 t7 pd3/sclk3/cts3 v16 p67/a15 v17 p22/a18/a2/a18
tmp19a64c1d tmp19a64(rev1.1)2-3 2.2 pin names and functions table 2.2.1 shows the names and functions of input/output pins. table 2.2.1 pin names and functions (1 of 6) pin name number of pins input or output function p00-p07 d0-d7 ad0-ad7 8 input/output input/output input/output port 0: input/output port that allows input/output to be set in units of bits data (lower): data buses 0 to 7 (separate bus mode) address data (lower): address data buses 0 to 7 (multiplexed bus mode) p10-p17 d8-d15 ad8-ad15 a8-a15 8 input/output input/output input/output output port 1: input/output port that allows input/output to be set in units of bits data (upper): data buses 8 to 15 (separate bus mode) address data (upper): address data buses 8 to 15 (multiplexed bus mode) address: address buses 8 to 15 (multiplexed bus mode) p20-p27 a16-a23 a0-a7 a16-a23 8 input/output output output output port 2: input/output port that allows input/output to be set in units of bits address: address buses 16 to 23 (separate bus mode) address: address buses 0 to 7 (multiplexed bus mode) address: address buses 16 to 23 (multiplexed bus mode) p30 rd 1 output output port 30: port used exclusively for output read: strobe signal for reading external memory p31 wr 1 output output port 31: port used exclusively for output write: strobe signal for writing data of d0 to d7 pins p32 hwr 1 input/output output port 32: input/output port (with pull-up) write upper-pin data: strobe signal for writing data of d8 to d15 pins p33 wait rdy 1 input/output input input port 33: input/output port (with pull-up) wait: pin for requesting cpu to put a bus in a wait state ready: pin for notifying cpu that a bus is ready p34 busrq 1 input/output input port 34: input/output port (with pull-up) bus request: signal requesting cpu to allow an exte rnal master to take the bus control authority p35 busak 1 input/output output port 35: input/output port (with pull-up) bus acknowledge: signal notifying that cpu has rel eased the bus control authority in response to busrq p36 r/w 1 input/output output port 36: input/output port (with pull-up) read/write: "1" shows a read cycle or a dummy cycle. "0" shows a write cycle. p37 ale 1 input/output output port 37: input/output port address latch enable (address latch is enabled only if access to external memory is taking place) p40 cs0 1 input/output output port 40: input/output port (with pull-up) chip select 0: "0" is output if the address is in a designated address area. p41 cs1 1 input/output output port 41: input/output port (with pull-up) chip select 1: "0" is output if the address is in a designated address area. p42 cs2 1 input/output output port 42: input/output port (with pull-up) chip select 2: "0" is output if the address is in a designated address area. p43 cs3 1 input/output output port 43: input/output port (with pull-up) chip select 3: "0" is output if the address is in a designated address area. p44 cs4 1 input/output output port 44: input/output port (with pull-up) chip select 4: "0" is output if the address is in a designated address area. p45 cs5 1 input/output output port 45: input/output port (with pull-up) chip select 5: "0" is output if the address is in a designated address area. p46 scout 1 input/output output port 46: input/output port system clock output: selectable between high- a nd low-speed clock outputs, as in the case of cpu p47 1 input/output port 47: input/output port p50-p57 a0-a7 8 input/output output port 5: input/output port that allows input/output to be set in units of bits address: address buses 0 to 7 (separate bus mode) p60-p67 a8-a15 8 input/output output port 6: input/output port that allows input/output to be set in units of bits address: address buses 8 to 15 (separate bus mode)
tmp19a64c1d tmp19a64(rev1.1)2-4 table 2.2.1 pin names and functions (2 of 6) pin name number of pins input or output function p70-p77 an0-an7 8 input input port 7: port used exclusively for input analog input: input from a/d converter p80-p87 an8-an15 8 input input port 8: port used exclusively for input analog input: input from a/d converter p90-p97 an16-an23 8 input input port 9: port used exclusively for input analog input: input from a/d converter pa0 tb0in0 int5 1 input/output input input port a0: input/output port 16-bit timer 0 input 0: for inputting the c ount/capture trigger of a 16-bit timer 0 interrupt request pin 5: selectable between "h" level, "l" level, risi ng edge, and falling edge input pin with schmitt trigger pa1 tb0in1 int6 1 input/output input input port a1: input/output port 16-bit timer 0 input 1: for inputting the c ount/capture trigger of a 16-bit timer 0 interrupt request pin 6: selectable "h" leve l, "l" level, rising edge and falling edge input pin with schmitt trigger pa2 tb0out 1 input/output output port a2: input/output port 16-bit timer 0 output: 16-bit timer 0 output pin pa3 tb1in0 int7 1 input/output input input port a3: input/output port 16-bit timer 1 input 0: for inputting the c ount/capture trigger of a 16-bit timer 1 interrupt request pin 7: selectable between "h" level, "l" level, risi ng edge and falling edge input pin with schmitt trigger pa4 tb1in1 int8 1 input/output input input port a4: input/output port 16-bit timer 1 input 1: for inputting the c ount/capture trigger of a 16-bit timer 1 interrupt request pin 8: selectable between "h" level, "l" level, risi ng edge and falling edge input pin with schmitt trigger pa5 tb1out 1 input/output output port a5: input/output port 16-bit timer 1 output: 16-bit timer 1 output pin pa6 tb2out 1 input/output output port a6: input/output port 16-bit timer 2 output: 16-bit timer 2 output pin pa7 tb3out 1 input/output output port a7: input/output port 16-bit timer 3 output: 16-bit timer 3 output pin pb0 tb4out 1 input/output output port b0: input/output port 16-bit timer 4 output: 16-bit timer 4 output pin pb1 tb5out 1 input/output output port b1: input/output port 16-bit timer 5 output: 16-bit timer 5 output pin pb2 tb6out 1 input/output output port b2: input/output port 16-bit timer 6 output: 16-bit timer 6 output pin pb3 tb7out 1 input/output output port b3: input/output port 16-bit timer 7 output: 16-bit timer 7 output pin pb4 tb8out 1 input/output output port b4: input/output port 16-bit timer 8 output: 16-bit timer 8 output pin pb5 tb9out 1 input/output output port b5: input/output port 16-bit timer 9 output: 16-bit timer 9 output pin pb6 tbain0 1 input/output input port b6: input/output port 16-bit timer a input 0: for inputting the c ount/capture trigger of a 16-bit timer a 2-phase pulse counter input 0 pb7 tbain1 1 input/output input port b7: input/output port 16-bit timer a input 1: for inputting the c ount/capture trigger of a 16-bit timer a 2-phase pulse counter input 1
tmp19a64c1d tmp19a64(rev1.1)2-5 table 2.2.1 pin names and functions (3 of 6) pin name number of pins input or output function pc0 txd0 1 input/output output port c0: input/output port sending serial data 0: open drain out put pin depending on the program used pc1 rxd0 1 input/output input port c1: input/output port receiving serial data 0 pc2 sclk0 cts0 1 input/output input/output input port c2: input/output port serial clock input/output 0 ready to send serial data 0 (clear to send): open drain output pin depending on the program used pc3 txd1 1 input/output output port c3: input/output port sending serial data 1: open drain out put pin depending on the program used pc4 rxd1 1 input/output input port c4: input/output port receiving serial data 1 pc5 sclk1 cts1 1 input/output input/output input port c5: input/output port serial clock input/output 1 ready to send serial data 1 (clear to send): open drain output pin depending on the program used pc6 txd2 1 input/output output port c6: input/output port sending serial data 2: open drain out put pin depending on the program used pc7 rxd2 1 input/output input port c7: input/output port receiving serial data 2 pd0 sclk2 cts2 1 input/output input/output input port d0: input/output port serial clock input/output 2 ready to send serial data 2 (clear to send): open drain output pin depending on the program used pd1 txd3 1 input/output output port d1: input/output port sending serial data 3: open drain out put pin depending on the program used pd2 rxd3 1 input/output input port d2: input/output port receiving serial data 3 pd3 sclk3 cts3 1 input/output input/output input port d3: input/output port serial clock input/output 3 ready to send serial data 3 (clear to send): open drain output pin depending on the program used pd4 txd4 1 input/output output port d4: input/output port sending serial data 4: open drain out put pin depending on the program used pd5 rxd4 1 input/output input port d5: input/output port receiving serial data 4 pd6 sclk4 cts4 1 input/output input/output input port d6: input/output port serial clock input/output 4 ready to send serial data 4 (clear to send): open drain output pin depending on the program used pd7 int9 1 input/output input port d7: input/output port interrupt request pin 9: selectable between "h" level, "l" level, risi ng edge and falling edge input pin with schmitt trigger
tmp19a64c1d tmp19a64(rev1.1)2-6 table 2.2.1 pin names and functions (4 of 6) pin name number of pins input or output function pe0 txd5 1 input/output output port e0: input/output port sending serial data 5: open drain out put pin depending on the program used pe1 rxd5 1 input/output input port e1: input/output port receiving serial data 5 pe2 sclk5 cts5 1 input/output input/output input port e2: input/output port serial clock input/output 5 ready to send serial data 5 (clear to send): open drain output pin depending on the program used pe3-pe5 3 input/output ports e3 to e5: input/output ports that allow input/output to be set in units of bits pe6 inta 1 input/output input port e6: input/output port interrupt request pin a: selectable between "h" level, "l" level, risi ng edge, and falling edge input pin with schmitt trigger pe7 intb 1 input/output input port e7: input/output port interrupt request pin b: selectable between "h" level, "l" level, risi ng edge, and falling edge input pin with schmitt trigger pf0 so sda 1 input/output output input/output port f0: input/output port pin for sending data if the serial bus interface operates in the sio mode pin for sending and receiving data if the serial bus interface operates in the i 2 c mode open drain output pin depending on the program used. input with schmitt trigger pf1 si scl 1 input/output input input/output port f1: input/output port pin for receiving data if the serial bus interface operates in the sio mode pin for inputting and outputting a clock if the serial bus interface operates in the i 2 c mode open drain output pin depending on the program used input with schmitt trigger pf2 sck 1 input/output input/output port f2: input/output port pin for inputting and outputting a clock if the se rial bus interface operates in the sio mode pf3 dreq2 1 input/output input port f3: input/output port dma request signal 2: for inputting the request to transfer data by dma from an external i/o device to dmac2 pf4 dack2 1 input/output output port f4: input/output port dma acknowledge signal 2: signal showing th at dreq2 has acknowledged a dma transfer request pf5 dreq3 1 input/output input port f5: input/output port dma request signal 3: for inputting the request to transfer data by dma from an external i/o device to dmac3 pf6 dack3 1 input/output output port f6: input/output port dma acknowledge signal 3: signal showing th at dreq3 has acknowledged a dma transfer request pf7 tbtin 1 input/output input port f7: input/output port 32-bit time base timer input: for inputting the count for 32-bit time base timer pg0-pg3 tc0in-tc3in 4 input/output input ports g0 to g3: input/output ports that allo w input/output to be se t in units of bits for inputting the capture tr igger for 32-bit timer pg4-pg7 tcou0-tcout3 4 input/output output ports g4 to g7: input/output ports that allo w input/output to be se t in units of bits outputting 32-bit timer if the re sult of a comparison is a match ph0-ph5 tcou4-tcout9 6 input/output output ports h0 to h5: input/output ports that allo w input/output to be se t in units of bits outputting 32-bit timber if the re sult of a comparison is a match ph6-ph7 2 input/output ports h6 to h7: input/output ports that allow input/output to be set in units of bits pi0 int0 1 input/output input port i0: input/output port interrupt request pin 0: selectable between "h" level, "l" level, risi ng edge and falling edge input pin with schmitt trigger pi1 int1 1 input/output input port i1: input/output port interrupt request pin 1: selectable between "h" level, "l" level, risi ng edge and falling edge input pin with schmitt trigger pi2 int2 1 input/output input port i2: input/output port interrupt request pin 2: selectable between "h" level, "l" level, risi ng edge and falling edge input pin with schmitt trigger
tmp19a64c1d tmp19a64(rev1.1)2-7 table 2.2.1 pin names and functions (5 of 6) pin name number of pins input or output function pi3 int3 1 input/output input port i3: input/output port interrupt request pin 3: selectable between "h" level, "l" level, risi ng edge and falling edge input pin with schmitt trigger pi4 int4 1 input/output input port i4: input/output port interrupt request pin 4: selectable between "h" level, "l" level, risi ng edge and falling edge input pin with schmitt trigger pj0 dreq2 1 input/output input port j0: input/output port dma request signal 2: for inputting the request to transfer data by dma from an external i/o device to dmac2 pj1 dack2 1 input/output output port j1: input/output port dma acknowledge signal 2: signal showing th at dreq2 has acknowledged a dma transfer request pj2 dreq3 1 input/output input port j2: input/output port dma request signal 3: for inputting the request to transfer data by dma from an external i/o device to dmac3 pj3 dack3 1 input/output output port j3: input/output port dma acknowledge signal 3: signal showing th at dreq3 has acknowledged a dma transfer request pk0-pk7 key0-key7 8 input/output input port k: input/output port that allows i nput/output to be set in units of bits key on wake up input 0 to 7 (with pull-up) with schmitt trigger pl0-pl7 8 input/output port l: input/output port that allows input/output to be set in units of bits pm0-pm7 8 input/output port m: input/output port that allows input/output to be set in units of bits pn0-pn7 8 input/output port n: input/output port that allows input/output to be set in units of bits po0 int0 1 input/output input port o0: input/output port interrupt request pin 0: selectable between "h" level, "l" level, risi ng edge and falling edge input pin with schmitt trigger po1 int1 1 input/output input port o1: input/output port interrupt request pin 1: selectable between "h" level, "l" level, risi ng edge and falling edge input pin with schmitt trigger po2 int2 1 input/output input port o2: input/output port interrupt request pin 2: selectable between "h" level, "l" level, risi ng edge and falling edge input pin with schmitt trigger po3 int3 1 input/output input port o3: input/output port interrupt request pin 3: selectable between "h" level, "l" level, risi ng edge and falling edge input pin with schmitt trigger po4 int4 1 input/output input port o4: input/output port interrupt request pin 4: selectable between "h" level, "l" level, risi ng edge and falling edge input pin with schmitt trigger po5 txd6 1 input/output output port o5: input/output port sending serial data 6: open drain out put pin depending on the program used po6 rxd6 1 input/output input port o6: input/output port receiving serial data 6 po7 sclk6 cts6 1 input/output input/output input port o7: input/output port serial clock input/output 6 ready to send serial data 6 (clear to send): open drain output pin depending on the program used pp0-pp7 tpd0-tpd7 8 input/output output port p: input/output port that allows input/output to be set in units of bits outputting trace data from the data access address: signal for dsu-ice pq0-pq7 tpc0-tpc7 tpd0-tpd7 8 input/output output output port p: input/output port that allows input/output to be set in units of bits outputting trace data from the program counter: signal for dsu-ice outputting trace data from the data access address: signal for dsu-ice
tmp19a64c1d tmp19a64(rev1.1)2-8 table 2.2.1 pin names and functions (6 of 6) pin name number of pins input or output function dclk 1 output debug clock: signal for dsu-ice eje 1 input ejtag enable: signal for dsu-ice (input with schmitt trigger and built-in noise filter) pcst4-0 5 output pc trace status: signal for dsu-ice dint 1 input debug interrupt: signal for dsu-ice (input with schmitt trigger, pull-up and built-in noise filter) tovr/tsta 1 output outputting the status of pd data overflow status: signal for dsu-ice tck 1 input test clock input: signal for testing jtag (input with schmitt trigger and pull-up) tms 1 input test mode select input: signal for te sting jtag (input with schmitt trigger and pull-up) tdi 1 input test data input: signal for testi ng jtag (input with schmitt trigger and pull-up) tdo 1 output test data output: signal for testing jtag trst 1 input test reset input: signal for testi ng jtag (input with schmitt trigger and pull-down) nmi 1 input nonmaskable interrupt request pin: pi n for requesting an interrupt at the falling edge input with schmitt trigger and built-in noise filter plloff 1 input fix this pin to the "h ( dvcc15) level."(input with schmitt trigger) reset 1 input reset: initializing lsi (with pull-up) input with schmitt trigger and built-in noise filter x1/x2 2 input/output pin for conn ecting to a high-speed oscillator xt1/xt2 2 input/output pin for conn ecting to a low-speed oscillator bupmd 1 input backup mode trigger pin: this pin must be set to "l level" in backup mode. breset 1 input backup module reset: initia lizing the backup module (with pull-up) input with schmitt trigger busmd 1 input pin for setting an external bus mode: th is pin functions as a multiplexed bus by sampling the "h (dvcc15) level" upon the rising of a reset signa l. it also functions as a separate bus by sampling "l" upon the rising of a reset signal. when performing a reset operation, pull it up or down according to a bus mode to be used. endian 1 input pin for setting endian: this pin is used to set a mode. it performs a big-endian operation by sampling the "h (dvcc15) level" upon the risi ng of a reset signal, and performs a little- endian operation by sampling "l" upon the rising of a reset signal. when performing a reset operation, pull it up or down according to the type of endian to be used. boot 1 input pin for setting a single boot mode: this pin goes into single boot mode by sampling "l" upon the rising of a reset signal. it is used to overwrite internal flash memory. by sampling "h (dvcc15) level" upon the rising of a reset signa l, it performs a normal operation. this pin should be pulled up under normal operati ng conditions. pull it up when resetting. bw0-1 2 input fix these pins to bw0 = "h (dvcc15)" and bw1 = "h (dvcc15)," respectively. (input with schmitt trigger) vrefh 1 input pin (h) for supplying the a/d converter with a reference power supply connect this pin to avcc31 if the a/d converter is not used. vrefl 1 input pin (l) for supplying the a/d converter with a reference power supply connect this pin to avss if the a/d converter is not used. avcc31-32 2 ? pin for supplying the a/d converter with a power supply. connect it to a power supply even if the a/d converter is not used. avss 3 ? a/d converter gnd pin (0 v). connect this pin to gnd even if the a/d converter is not used. test1-3 3 input test pin: to be fixed to gnd. cvcc15 1 ? pin for supplying oscillators w ith power: 1.5 v power supply cvss/bvss 1 ? gnd pin (0 v) for oscillators and backup modules dvcc15 4 ? power supply pin: 1.5 v power supply bvcc 1 ? pin exclusively for supplying backup modules with power: 3 v power supply dvcc30-34 8 ? power supply pin: 3 v power supply dvss 11 ? gnd pin (0 v)
tmp19a64c1d tmp19a64(rev1.1)2-9 note 1: for busmd, endian and boot pins, the state designated for each pin ("h" or "l" level) must be maintained during one system clock before and after the rising of a reset signal. the reset pin must always be in a stable state at both "l" and "h" levels. note 2: for dreq2, dack2, dreq3 and dack3, it is necessary to go to the port function register and to select one port from two groups of ports, pf3 to pf6 and pj0 to pj3. two ports cannot be operated simultaneously to use the same function. likewise, for pins int0 through int4, one port must be selected from ports pi0 to pi4 and ports po0 to po4. table 2.2.2 shows the pin names and power supply pins. table 2.2.2 pin names and power supply pins pin name power supply pin pin name power supply pin p0 dvcc33 pcst4 to 0 dvcc31 p1 dvcc33 dclk dvcc31 p2 dvcc33 eje dvcc31 p3 dvcc33 trst dvcc31 p4 dvcc33 tdi dvcc31 p5 dvcc33 tdo dvcc31 p6 dvcc33 tms dvcc31 p7 avcc32 tck dvcc31 p8 avcc32 dint dvcc31 p9 avcc31 tov dvcc31 pa dvcc32 busmd dvcc15 pb dvcc32 boot dvcc15 pc dvcc32 endian dvcc15 pd dvcc32 nmi dvcc15 pe dvcc32 breset bvcc pf dvcc32 bupmd bvcc pg dvcc32 x1, x2 cvcc15 ph dvcc32 xt1, xt2 bvcc pi dvcc30 bw0 and 1 dvcc15 pj dvcc33 plloff dvcc15 pk dvcc34 reset dvcc15 pl dvcc34 pm dvcc34 pn dvcc34 po dvcc34 pp dvcc31 pq dvcc31 z 2.7 v avcc32 avcc31
tmp19a64c1d tmp19a64(rev1.1)2-10 table 2.2.3 shows the pin numbers and power supply pins. table 2.2.3 pin numbers and power supply pins power supply pin pin number voltage range dvcc15 d4, d8, e18, n9 1.35 v to 1.65 v cvcc15 c17 1.35 v to 1.65 v dvcc30 k17 1.65 v to 3.3 v dvcc31 h2 1.65 v to 3.3 v dvcc32 m6, u8 1.65 v to 3.3 v dvcc33 f17, u14 1.65 v to 3.3 v dvcc34 d15, f10 1.65 v to 3.3 v avcc31 b1 2.7 v to 3.3 v avcc32 f9 2.7 v to 3.3 v bvcc e15 2.3 v to 3.3 v (under normal operating conditions) 1.8 v to 3.3 v (in backup mode)
tmp19a64c1d tmp19a64 (rev1.1) 3-1 3. processor core the tmp19a64 has a high-performance 32 -bit processor core (tx19a processor core). for information on the operations of this processor core, please re fer to the "tx19a family architecture." this chapter describes the functions unique to the tmp19a64 that are not explained in that document. 3.1 reset operation to reset the device, ensure that the power supply voltage is in the operating voltage range, the oscillation of the internal high-frequency oscillator has stabilized at the specified frequency and that the reset input has been "0" for at least 12 system clocks (1.78 s during external 13.5 mhz operation). note that the pll multiplication clock is quadrupled and the clock gear is initialized to the 1/8 mode during the reset period. when the reset request is authorized, ? the system control coprocessor (cp0) register of the tx19a processor core is initialized. for further details, please refer to the chapter about architecture. ? after the reset exception handling is executed, the program branches of f to the exception handler. the address to which the program branches off to (add ress where exception handling starts) is called an exception vector address. this exce ption vector address of a reset exception (for example, nonmaskable interrupt) is 0xbfc0_0000h (virtual address). ? the register of the internal i/o is initialized. ? the port pin (including the pin that can also be used by the internal i/o) is set to a general-purpose input or output port mode. (note 1) set the reset pin to "0" before turning the power on. perform the reset after the power supply voltage has stabilized suffic iently within the operating range. (note 2) the reset operation can alter the internal ram state, but does not alter data in the backup ram. (note 3) make sure that the power supply voltage has stabilized, wait for 500 s or longer, and perform the reset. (note 4) in the flash program, the reset period of 0.5 us or longer is required independently of the system clock.
tmp19a64c1d tmp19a64 (rev1.1) 4-1 4. memory map fig. 4.1 shows the memory map of the tmp19a64. fig. 4.1 memory map (note 1) the internal rom is physically present in 0x1fc0_0000-0x1fdf_ffff (2 mb). the internal ram is physically present in 0xfffd_0000-0xfffd_ffff (64 kb). 0xffff_0000-0xffff_dfff (56 kb) becomes the projection area. you can access the internal ram by accessing this area. the internal backup ram area becomes 0xffff_e800-0xffff_e9ff (512 b). (note 2) for the tmp19a64, a physical space of only 16 mb is available as external address space to be accessed. it is possible to place this 16-mb physical address space in a chip select area of your choice inside the 3.5-gb physical address space of the cpu. access to internal memory, internal i/o space and reserved areas is given priority over access to the external address space. therefore, access to the external address space is denied if any of the internal memory, internal i/o space or reserved areas are being accessed. (note 3) do not place an instruction in the last four words of a physical area, specifically the last four words of an area where memory is mounted for external rom extension (this varies depending on the system of the user). internal rom: 0x1fdf_fff0-0x1fdf_ffff 0xffff ffff virtual address 16 mb reserved kseg1 (cash disabled) kseg2 (cash enabled) 16 mb reserved kseg0 (cash enabled) kuseg (cash enabled) 0xff00 0000 0xbfcf ffff 0xbfc0 0000 0xa000 0000 0x8000 0000 0x000f ffff 0x0000 0000 physical address 16 mb reserved kseg2 (1 gb) 16 mb reserved kuseg (2 gb) internal rom area projection inaccessible internal rom 512 mb internal i/o internal ram (64 kb) reserved for debugging (2 mb) user program area exception vector area 0xffff e000 0xffff 0000 (reserved) 0xff3f ffff 0x401f ffff 0x4000 0000 0x1fdf ffff 0x1fc0 0000 0xff20 0000 (reserved) maskable interrupt area 0xff00 0000 0x1fdf ffff 0x1fc0 0400 0x1fc0 0000 0xffff dfff internal ram area (56 kb) projection 0xfffd 0000 0xfffd ffff (reserved)
tmp19a64c1d tmp19a64 (rev1.1) 5-1 5. clock/standby control 5.1 system operation modes the system operation modes contain the standby modes in which the processor core operations are stopped to reduce power consumption. fig. 5.1.1 state transition diagram of each operation mode is shown below. reset normal mode ( fc/ g ear value ) reset has been performed idle mode (cpu stop) (i/o selective operation) instruction interrupt stop mode (entire circuit stop) instruction interrupt state transition diagram of clock mode when no power is supplied to the backup module normal mode (fc/gear value) idle mode (cpu stop) (i/o selective operation) reset stop mode (note 1) slow mode (fs) main power on external input & main power off (note 2) external input & main power off backup mode (fs only) sleep mode (fs only) (note 2) instruction interru p t interrup t instruction interrupt instruction interru p t instruction interru p t instruction reset has been performed instruc- tion state transition diagram of clock mode when power is supplied to the backup module (note 1) stop mode: all the circuits except the backup module are brought to a stop. the backup module continues operation (fs continues oscillation). (note 2) external input: it is necessary to activate the bupmd pin during the reset period. for details, see the chapter on backup ram. fig. 5.1.1 state transition diagram of each operation mode
tmp19a64c1d tmp19a64 (rev1.1) 5-2 5.2 default state of the system clock reset normal mode fc = fpll = fosc 4 fsys = fc/8 fsys = fosc/2 fperiph = fgear = fsys reset has been performed plloff pin ("h") use the pll clock fig. 5.2.1 initial stat e of the system clock fosc: high-frequency clock frequency to be input via the x1 and x2 pins fpll: clock frequency multiplied (quadrupled) by the pll fc: clock frequency when the plloff pin is in the "h" state fs: low-frequency clock frequency to be input via the xt1 and xt2 pins fgear: clock frequency selected by the sy stem control register syscr1 in the clock generator fsys: system clock frequency the cpu, rom, ram, dmac and intc all operate according to this clock. the internal peripheral i/o operates according to the fsys/2 clock. fperiph: clock frequency select ed by syscr1 (clock to be input to the peripheral i/o prescaler)
tmp19a64c1d tmp19a64 (rev1.1) 5-3 5.3 clock system block diagram 5.3.1 main system clock ? allows for oscillator connection or external clock input. ? keep the plloff pin (pll (quadruple)) at the "h" level. ? clock gear (8/8, 7/8, 6/8, 5/8, 4/8, 2/8, 1/8) (default is 1/8.) ? input frequency (high frequency) input frequency range maximum operating frequency lowest operating frequency pll operation (for both oscillators and external input) 8-13.5 (mhz) 54 mhz 4 mhz * * clock gear 1/8 (default) is us ed when 8 mhz (min) is input. ? input frequency (low frequency) input frequency range maximum operating frequency lowest operating frequency 30 khz to 34 khz 34 khz 30 khz (note) (precautions for switching the high-speed clock gear) switching of clock gear is executed when a value is written to the syscr1 register. there are cases where switching does not occur immediately after the change in the register setting but the original clock gear is used for execution of instructions. if it is necessary to use the new clock for execution of the instructions following to the clock gear switching instruction, insert a dummy instruction (to execute a write cycle). to use the clock gear, ensure that you make the time setting such that tn of the prescaler output from each block in the peripheral i/o is calibrated to tn tmp19a64c1d tmp19a64 (rev1.1) 5-4 5.3.2 clock gear ? the high-speed clock is divided into 8/8, 7/8, 6/8, 5/8, 4/8, 2/8 or 1/8. ? the internal i/o prescaler clock t0: fperiph/2, fperiph/4, fperiph/8 and fperiph/16 fig. 5.3.1 shows the system clock transition diagram. fosc 2 4 8 16 (fs) fc fpll = fosc 4 input to peripheral i/o prescaler tmrb/c, sio, sbi, 2-phase pulse input counter peripheral i/o adc,tmrb/c, sio, sbi, wdt, port fsys fs high-speed oscillator xt1 xt2 x1 x2 syscr0 syscr2 warm-up timer 1/2 1/4 1/8 fperiph (to peripheral i/o) pll syscr1 syscr1 eight frequency divisions after the reset has been performed cpu rom ram dmac intc syscr0 fsys fperiph 2 syscr0 fs syscr3 scout fgear syscr1 t0 2 syscr1 a dc conversion clock clock timer (fs) t0 low-speed oscillator fig. 5.3.1 system clock transition diagram
tmp19a64c1d tmp19a64 (rev1.1) 5-5 5.4 cg registers 5.4.1 system control registers 7 6 5 4 3 2 1 0 syscr0 bit symbol xen rxen wuef prck1 prck0 (0xffff_ee00) read/write r/w r/w r/w r/w r r/w r/w r/w after reset 1 1 1 1 0 0 0 0 function high-speed oscillator 0: stop 1: oscillation write "1." high-speed oscillator after the stop mode is released 0: stop 1: oscillation write "1." this can be read as "0." control of warm-up timer (wup) for oscillator 0 write: don't care 1 write: wup start 0 read: wup finished 1 read: wup operating select prescaler clock 00: fperiph/16 01: fperiph/8 10: fperiph/4 11: fperiph/2 15 14 13 12 11 10 9 8 syscr1 bitsymbol sysckflg sysc k fpsel sgear gear2 gear1 gear0 (0xffff_ee01) read/write r r r/w r/w r/w r/w r/w r/w after reset 0 0 0 0 0 1 1 1 function this can be read as "0." system clock status flag 0: high speed (fc) 1: low speed (fs) select system clock 0: high speed (fc) 1: low speed (fs) select fperiph 0: fgear 1: fc select gear of low-speed clock 0: fs/1 1:fs/2 select gear of high-speed clock (fc) 000: fc 100: fc4/8 001: fc7/8 101: reserved 010: fc6/8 110: fc2/8 011: fc5/8 111: fc1/8 23 22 21 20 19 18 17 16 syscr2 bitsymbol drvosch wupt1 wupt0 stby1 stby0 drve (0xffff_ee02) read/write r/w r/w r/w r/w r/w r/w r r/w after reset 0 0 1 0 1 1 0 0 function high-speed oscillator current control 0: high capability 1: low capability write 0. select oscillator warm-up time 00: no wup 01: 2 /input frequency 10: 2 14 /input frequency 11: 2 16 /input frequency select standby mode 00:reserved 01:stop 10:sleep 11:idle this can be read as "0." 1: drive the pin even in the stop mode. 31 30 29 28 27 26 25 24 syscr3 bitsymbol scosel1 scosel0 alesel (0xffff_ee03) read/write r r/w r/w r/w r after reset 0 0 1 1 0 0 0 0 function this can be read as "0." select scout output 00:fs 01:fperiph 10:fsys 11: t0 set ale output width 0:fsys 1 1:fsys 2 this can be read as "0." ? don't switch the sysck and the gear<2:0> simultaneously. ? if the system enters the stop mode with syscr2 set at 1 (low capability), the setting will change to 0 (high capability) after the stop mode is released. make the setting again, as required. ? sysck can be switched when xen is set to "1." (note) restriction on use of the clock gear when using the clock gear to operate the peripheral i/o, set the syscr1 to the frequency division ratio of fc, fc4/8, fc2/8 or fc1/8. if other frequency division rati os are used, the peripheral i/o will not operate properly.
tmp19a64c1d tmp19a64 (rev1.1) 5-6 5.5 system clock controller by resetting the system clock controller, the controller status is initialized to = "1" and = "111," and the system clock fs ys changes to fc/8. (fc = fosc (original oscillation frequency) 4, because the original oscillation is quadrupled by pll.) for example, when a 13.5 -mhz oscillator is connected to the x1 or x2 pin, fsys becomes 6.25 mhz (=13.5 4 1/8) after the reset. similarly, when the oscillator is not connected and an external oscillator is used to input a clock instead, fsys becomes the frequency obtained from the calculation "input frequency 4 1/8." (note) set the initial system clock frequency to 4 mhz or higher. 5.5.1 oscillation stabilization time (switching between the normal and slow modes) the warm-up timer is provided to confirm the oscillation stability of the oscillator wh en it is connected to the oscillator connection pin. the warm-up time can be selected by setting the syscr2 depending on the characteristics of the oscillator. the syscr0 is used to confirm the start and completion of warm-up through software (instruction). after the co mpletion of warm-up is conf irmed, switch the system clock (syscr1). when clock switching occurs, the current system clock can be checked by monitoring the syscr1. table 5.5.1 shows the warm-up time when switching occurs. (note 1) warm-up is not required when an oscillator is used for the clock and providing stable oscillation. (note 2) the warm-up timer operates accordi ng to the oscillation clock, and it can contain errors if there is any fluctuation in the oscillation frequency. therefore, the warm-up time should be taken as approximate time. table 5.5.1 warm-up time warm-up time options syscr2 high-speed clock (fosc) 01 (2 8 /oscillation frequency) 18.963 ( s) 10 (2 14 /oscillation frequency) 1.214 (ms) 11 (2 16 /oscillation frequency) 4.855 (ms) these values are calculated under the following condition: fosc = 13.5 mhz
tmp19a64c1d tmp19a64 (rev1.1) 5-7 transition from the normal mode to the slow mode syscr1="1" : switch the system clock to low speed (fs) syscr1read : confirm that the current state is "1 " (the current system clock is fs) syscr0="0" : disable the high-speed oscillation (fosc) transition from the slow mode to the normal mode syscr2="xx" : select the warm-up time syscr0="1" : enable the high-speed oscillation (fosc) syscr0="1" : start the warm-up timer (wup) syscr0 read : wait until the state becomes "0" (wup is finished) syscr1="0" : switch the system clock to high speed (fgear) syscr1read : confirm that the current state is "0 " (the current system clock is fgear) (note) in the slow mode, the cpu operates with the low-speed clock, and the intc, the backup block, the 2-phase pulse input counter, the kwup, the io port and the ebif (external bus interface) are operable. stop other internal peripheral functions before the system enters the slow mode. 5.5.2 system clock pin output function the system clock, fsys, fsys/2 or fs, can be output from the p46/scout pin. by setting the port 4 related registers, p4cr to "1" and p4fc to "1," the p46/scout pin becomes the scout output pin. the output clock is selected by setting the syscr3. table 5.5.2 shows the pin states in each standby mode when the p46/scout pin is set to the scout output. table 5.5.2 scout output state in each standby mode standby mode mode scout selection normal slow idle sleep stop = "00" output the fs clock. = "01" output the fpriph clock. = "10" output the fsys clock. fixed to "0" or "1." = "11" output the t0 clock. fixed to "0." output the t0 clock. fixed to "0." (note) the phase difference (ac timing) between the system clock output by the scout and the internal clock is not guaranteed.
tmp19a64c1d tmp19a64 (rev1.1) 5-8 5.5.3 reducing the oscillator driving capability this function is intended for restricting oscillation nois e generated from the oscillator and reducing the power consumption of the oscillator when it is connected to the oscillator connection pin. setting the syscr2 to "1" reduces the driv ing capability of the high-speed oscillator. (low capability) this is reset to the default setting "0." when the power is turned on, oscillation starts with the normal driving capability (high capability). this is automatically set to the high driving capability state ( ="0") whenever the oscillator starts oscillation due to mode transition. z reducing the driving capability of the high-speed oscillator c2 c1 enable oscillation x1 pin syscr2 f osc x2 pin oscillator fig. 5.5.1 oscillato r driving capability 5.5.4 clock frequency division for low-speed system clock the low-speed clock (fs) can be divided into two by setting the system control register syscr1 to "1." this reduces the power consumption in the slow mode. set the clock frequency division during high-speed oscillation.
tmp19a64c1d tmp19a64 (rev1.1) 5-9 5.6 prescaler clock controller each internal i/o (tmrb0-a, tmrc, sio0-6 and sbi) has a prescaler for dividing a clock. the clock t0 to be input to each prescaler is obtained by selecting the "fperiph" clock at the syscr1 and the syscr0 and then dividing the clock accordi ng to the setting of syscr0. after the controller is reset, fperiph/16 is selected as t0. for details, please refer to fig. 5.3.1 system clock transition diagram. 5.7 clock multiplication circuit (pll) keep the plloff pin at the "h" level. this pin is the ci rcuit that outputs the fpll clock that is a quadruple of the output clock of the high-speed oscillator, fosc. this lowers the oscillator input frequency while increasing the internal clock speed. 5.8 flash access control circuit (pfb) the pfbwait register can be used to select the speed of access to the flash memory. you need to set an appropriate flash access sp eed for the operating fr equency to be used. 31 - 2 1 0 pfbwait bit symbol - pfbwait (0xffff_e500) read/write r r/w r/w after reset 0 1 1 pfbwait: wait number 11: 4-clock access/10: 3-clock access/01: 2-clock access 00: setting disabled operating frequency (fc) mhz pfbwait<1:0> 40- < 45 <=54 11 { { { 10 { { { 01 { 00 ? ? ? { : settable : not settable ? : setting prohibited note) if an appropriate access speed is not specif ied, the program can operate improperly.
tmp19a64c1d tmp19a64 (rev1.1) 5-10 5.9 standby controller the tx19a core has several low-consumption modes. to shift to the stop, sleep or idle (halt or doze) mode, set the rp bit in the cpo status register , and then execute th e wait instruction. before shifting to the mode, you need to select the st andby mode at the system control register (syscr2). the idle, sleep and stop modes have the following features: idle: only the cpu is stopped in this mode. the internal i/o has one bit of the on/off setting register for operation in the idle mode in the register of each module. this enables operation settings for the idle mode. when the internal i/o has been set not to operate in the idle mode, it stops operation and holds the state when the system enters the idle mode. table 5.9.1 shows a list of idle setting registers. table 5.9.1 internal i/o setting registers for the idle mode internal i/o idle m ode setting register tmrb0-a tbxrun tbt tbtrun sio0-6 scxmod1 sbi sbibr0 a/d converter admod1 wdt wdmod (note 1) the halt mode is activated by setting the rp bit in the status register to "0," executing the wait command and shifting to the standby mode. in this mode, the tx19a processor core stops the processer operation while holding the status of the pipeline. the tx19a gives no response to the bus control authority request from the internal dma, so the bus contro l authority is maintained in this mode. (note 2) the doze mode is activated by setting the rp bit in the status register to "1" and shifting to the standby mode. in this mode, the tx19a processor core stops the processer operation while holding the status of the pipeline. the tx19a can respond to the bus control authority request given from the outside of the processor core. sleep: only the internal lo w-speed oscillator, the backup block, th e 2-phase pulse inpu t counter operate. stop: all the internal circuits are brought to a stop.
tmp19a64c1d tmp19a64 (rev1.1) 5-11 5.9.1 cg operations in each mode table5.9.1 status of cg in each operation mode clock source mode oscillation circuit pll clock supply to peripheral i/o clock supply to cpu oscillator normal { { { { slow { partial supply (note) { idle (halt) { { selectable idle (doze) { { selectable sleep fs only backup block/2-phase pulse input counter stop { : on or clock supply : off or no clock supply (note) peripheral functions that can work in the slow mode: intc, external bus interface, io port, backup block and 2-phase pulse input counter 5.9.2 block operations in each mode table 5.9.2 block operating status in each operation mode block normal slow idle (doze) idle (halt) sleep stop backup tx19a processor core dmac intc external bus i/f io port { { { { { { { { { { { { { { { adc sio i2c tmrb tmrc wdt 2-phase counter backup block { { { { { { { { { (note 1) on/off selectable for each module { { { / (note 3) { kwup { { { { { cg { { { { { high-speed oscillator (fc) { (note 2) { { low-speed oscillator (fs) { { { { { { { { : on : off ? low-speed oscillation is active when the bvcc is applied, and not active when the bvcc is shut off. (note 1) the backup ram is inaccessible in the slow mode. (note 2) when the system ente rs the slow mode, the high-sp eed oscillator must be stopped by setting the syscr1. (note 3) in the slow mode, the backup block operates differently depending on the bupmd pin.
tmp19a64c1d tmp19a64 (rev1.1) 5-12 5.9.3 releasing the standby state the standby state can be released by an interrupt request when the interrupt level is higher than the interrupt mask level, or by the reset. the standby release source that can be used is determined by a combination of the standby mode and the state of the interr upt mask register assigned to the status register in the system control coprocessor (cpo) of the tx19a processor core. details are shown in table 5.9.3 standby release sources and standby release operations. z release by an interrupt request operations of releasing the standby state using an interrupt request vary depending on the interrupt enabled state. if the interrupt level specified before the system enters the standby mode is equal to or higher than the value of the interrupt mask register, an interrupt handling operation is executed by the trigger after the standby is released, and the processing is started at the instruction next to the standby shift instruction (wait instruction). if the interrupt request level is lower than the value of the interrupt mask register, the processing is started with the instruction next to th e standby shift instruction (wait instruction) without executing an interrupt handling operation. (the in terrupt request flag is maintained at "1".) for a nonmaskable interrupt, an interrupt handling is executed after the standby state is released irrespectively of the mask register value. z release by the reset any standby state can be released by the reset. note that releasing of the stop mode requires sufficient reset time to allow the oscillator operation to become stable. (refer to table 5.1.) when the standby mode is released by the reset, data in the backup ram can maintain the state immediately before the standby state is started, but other settings will be initialized. (when the standby mode is released by an interruption, the state imme diately before the standby state is started will be maintained.) please refer to "6. interrupt" for details of interrupts fo r stop, sleep and idle release and ordinary interrupts.
tmp19a64c1d tmp19a64 (rev1.1) 5-13 table 5.9.3 standby release source s and standby release operations (interrupt level)>(interrupt mask) interrupt accepting state interrupt enabled ei= "1" interrupt disabled ei= "0" standby mode idle (programmable) sleep stop idle (programmable) sleep stop intwdt ? ? int0-b (note 1) { { { (note 1) kwup0-7 (note 1) { { { (note 1) intrtc { { inttba (note 2) { { inttb0-9 { intrx0-6, tx0-6 { ints { standby release source interrupt intad/adhp/adm { : starts the interrupt handling after the standby mode is released. (the lsi is initialized by the reset.) { : starts the processing at the address next to the standby instruction (without executing the interrupt handling) after the st andby mode is released. : cannot be used for releasing the standby mode ? : cannot execute masking with an interruption mask when a nonmaskable interrupt is selected. (note 1) the standby mode is released after the warm-up time has elapsed. (note 2) these operations are applicable only when the 2-phase pulse input counter mode is selected. if any other modes are selected, the operations will be the same as those for the inttb0 to inttb9. z to release the standby mode by using the level mode interrupt in the interruptible state, keep the level until the interrupt handling is started. changing the level before then will prevent the interrupt processing from starting properly. z to enter the standby mode when the cpu has disabled the acceptance of interrupts, disable interrupts other than the recovery factors in advance by using the interrupt controller (intc). otherwise, the standby mode can be released by any other interrupts than the recovery factors. z to recover from the standby mode when the cpu has disabled the acceptance of interrupts, set the interrupt level higher than the interrupt mask (interrupt level > interrupt mask). if the interrupt level is equal to or lower than the interrupt mask (interrupt level interrupt mask), the system cannot recover from the standby mode.
tmp19a64c1d tmp19a64 (rev1.1) 5-14 5.9.4 stop mode in the stop mode, all the internal circuits, including the internal oscillators, are brought to a stop. the pin states in the stop mode vary depending on the settin g of the syscr2. table 5.9.6 shows the pin states in the stop mode. when the stop mode is released , the system clock output is started after the elapse of warm-up time at the warm-up counter to allow the internal oscillators to stabilize. after the stop mode is released, the system returns to the operation mode that was active immediately before the stop mode (normal or slow), and starts the operation. it is necessary to make these settings before the instru ction to enter the stop mode is executed. specify the warm-up time at the syscr2. (note) to shift from the normal mode to the stop mode on the tmp19a64, do not set the syscr2 to "00" or "01" for the warm-up time setting. the internal system recovery time cannot be satisfied when the system recovers from the stop mode. table 5.9.4 warm-up settings for transitions of operation modes transition of operation mode warm-up setting normal idle not required normal sleep not required normal slow not required normal stop not required idle normal not required sleep normal required sleep slow not required slow normal required (note 1) slow sleep not required slow stop not required stop normal required stop slow not required note 1) when the high-speed oscillator is stopped in the slow mode
tmp19a64c1d tmp19a64 (rev1.1) 5-15 (note)19a64 requires a recovery time from warming up state as following sleep mode (fs) normal mode (fc/ gear) idle mode reset reset release software interru p t stop mode software softwar interrupt (cpu stop) (selective i/o ) interrupt slow mode (fs) interrupt softwar softwar interrupt soft all stoped a b c d e f g h state transition diagram wup trigger state transition running mode after wup minimum required operation time before wait instruction done (sec) a stop/sleep 64 / fsys in nomal mode stop release b stop/sleep 16 / fsys in slow mode c stop/sleep 64 / fsys in nomal mode sleep release d stop/sleep -
tmp19a64c1d tmp19a64 (rev1.1) 5-16 5.9.5 recovery from the stop or sleep mode 1. transition of operation modes: normal stop normal normal normal stop fsys (high-speed clock) mode cg (high-speed clock) system clock off warm-up (w-up) start of high-speed clock oscillation start of warm-up end of warm-up when @fosc=13.5 mhz selection of warm-up time syscr2 warm-up time (fosc) 01 (2 8 /fosc) setting disabled 10 (2 14 /fosc) 1.214 ms 11 (2 16 /fosc) 4.855 ms (note) when @fosc=13.5 mhz, the internal system recovery time cannot be satisfied. do not set to "01." 2. transition of operation modes: normal sleep normal normal normal sleep system clock off fsys (high-speed clock) mode cg (high-speed clock) cg (low-speed clock) warm-up (w-up) low-speed clock (fs) continues oscillation start of high-speed clock oscillation start of warm-up end of warm-up when @fosc=13.5 mhz selection of warm-up time syscr2 warm-up time (fosc) 01 (2 8 /fosc) setting disabled 10 (2 14 /fosc) 1.214 ms 11 (2 16 /fosc) 4.855 ms (note) when @fosc=13.5 mhz, the internal system recovery time cannot be satisfied. do not set to "01."
tmp19a64c1d tmp19a64 (rev1.1) 5-17 3. transition of operation modes: slow stop slow (note) the low-speed clock (f s) continues oscillation. the re is no need to make a warm-up setting. 4. transition of operation modes: slow sleep slow (note) the low-speed clock (f s) continues oscillation. the re is no need to make a warm-up setting. slow slow stop slow slow stop fsys (low-speed clock) mode cg (fs) (low-speed clock) s y stem clock off s y stem clock off fsys (low-speed clock) mode cg (fs) (low-speed clock)
tmp19a64c1d tmp19a64 (rev1.1) 5-18 table 5.9.6 pin states in the stop mode in each state of syscr2 (1/2) pin name input/output = 0 = 1 p00-p07 input mode output mode ad0-ad7, d0-d7 ? ? ? ? output ? p10-p17 input mode output mode, a8-a15 ad8-ad15, d8-d15 ? ? ? ? output ? p20-p27 input mode output mode, a0-a7/a16-a23 ? ? ? output p30 (/rd), p31 (/wr) output pin ? output p32, p35, p36 input mode output mode, /hwr, /busak, r/w_ pu* pu* ? output p33 input mode, /wait, /rdy output mode pu* pu* ? output p34 input mode output mode busrq pu* pu* pu* ? output output p37 (ale) input mode output mode ale (output mode) ? ? "l" level output ? output "l" level output p40-p45 input mode output mode, cs0-cs5 pu* pu* input output p46 (scout) input mode output mode ? ? input output p47 input mode output mode ? ? input output p50-p57 input mode output mode, a0-a7 ? ? ? output p60-p67 input mode output mode, a8-a15 ? ? ? output p7, p8, p9 input pin, an0-an23 ? ? pa0, pa1, pa3, pa4 input mode output mode int5-int8 (input mode) ? ? input input output input cpa2, pa5, pa6, pa7 input mode output mode, tb0out,tb1-3out ? ? input output pb0-pb7 input mode, tbain1 output mode, tb4-9out ? ? input output pc0-pc7 input mode, sclk0-1, rxd0-2, /cts0-1 output mode, sclk0-1,txd0-2 ? ? input output pd0-pd6 input mode, sclk2-4, rxd3-4, /cts2-4 output mode, sclk2-4,txd3-4 ? ? input output pd7 input mode output mode int9 (input mode) ? ? input input output input pe0-pe2 input mode, sclk5, rxd5, /cts5 output mode, sclk5, txd5 ? ? input output pe3-pe5 input mode output mode ? ? input output pe6-pe7 input mode output mode inta-intb (input mode) ? ? input input output input
tmp19a64c1d tmp19a64 (rev1.1) 5-19 table 5.9.6 pin states in the stop mode in each state of syscr2 (2/2) pin name input/output = 0 = 1 pf0-pf7 input mode, s da, si, scl, sck, /dreq2-, tbtin output mode, so, sda, scl, sck, /dack2-3 ? ? input output pg0-pg7 input mode, tc0-3in output mode, tcout0-3 ? ? input output ph0-ph5 input mode output mode, tcout4-9 ? ? input output ph6-ph7 input mode output mode ? ? input output pi0-pi4 input mode output mode int0-int4 (input mode) ? ? input input output input pj0-pj3 input mode, /dreq2-3 output mode, /dack2-3 ? ? input output pk0-pk7 input mode output mode key0-key7 (input mode) ? ? input input output input pl, pm, pn input mode output mode ? ? input output po0-po4 input mode output mode int0-int4 (input mode) ? ? input input output input po5-po7 input mode, rxd6, /cts6 output mode, txd6, ? ? input output pp, pq input mode output mode tpd0-7, tpc0-7 ? ? output input output output nmi input pin input input plloff input pin input input reset input pin input input bupmd input pin input input breset input pin input input busmd input pin input input endian input pin input input boot input pin input input bw0-1 input pin input input test1-3 input pin input input x1 input pin ? ? x2 output pin "h" leve l output "h" level output ? : indicates that the input is disabled for the input mode and the input pin and the impedance becomes high for the output mode and the output pin. note that the input is enabled when the port function register (pxfc) is "1" and the port control register (pxcr) is "0." input : the input gate is active. to prevent the input pi n from floating, fix the input voltage to the "l" or "h" level. output : the pin is in the output state. pu * : this is the programmable pull-up pin. the input ga te is always disabled. no feedthrough current flows even if the high impedance is selected.
tmp19a64c1d tmp19a64(rev1.1) 6-1 6. interrupts 6.1 overview the features of the tx19a6 4 interrupts are as follows: ? 2 interrupts from the cpu itself (software interrupt instruction) ? 21 external pins ( nmi , int0 to intb, kwup0 to 7) ? 51 interrupts from internal i/o (including wdt interrupt) ? generation of vectors for each interrupt factor ? seven interrupt levels for each interrupt factor ? an interrupt can be used to activate the dmac. (1) preparation for interrupt settings ? settings required before generating interrupts: set the exception table base address (the base ad dress of the table of maskable interrupt jump addresses) to ivr. set the interrupt jump addresses to the "exception table base address + ivr offset address" memory. set status of the cp0 register to "0x111." * for details of the status register, refer to the material "tx19a core architecture."
tmp19a64c1d tmp19a64(rev1.1) 6-2 fig. 6.1.1 interrupt connection diagram intnen standby clear control 15 detection circuit h/l level or edge setting h level 15 active h level 15 kwup int0 to b 12 kwup0 to 7 1 cg other interrupts intc core 15 h/l level or edge setting input enable/disable for each interrupt factor kwup status register imcxx register imcgxx register kwup0 to 7 register rising edge 1 1 inttba rising edge nmi wdt write bus error 3 tmrb rtc
tmp19a64c1d tmp19a64(rev1.1) 6-3 (2) interrupts from external pins (int0 - intb and kwup0-7) when any external interrupt is to be used for setting to clear the standby mode, use the following steps: c set ports d set functions e set cg f clear the eicrcg and intclr registers of cg g enable interrupts with int a) int0 - intb z if it is used to clear the stop mode: imcgx = "xxx" : set the stan dby clear request of each interrupt (int0-b) to "active" (refer to intcg register). imcgx = "1" : set the clear in put of each interrupt (int0-b) to "enable" (refer to intcg register). eicrcg = "xxxx" : clear each interr upt request (int0-b) (refer to intcg register). intclr = "000000100" : clear interrupt requests int0-b (refer to intcg register). imcx = "01" : set each interr upt request (int0-b) to the h level (refer to intc register). b) kwup0-7 z if it is used to clear the stop mode: imcgd = "01" : set the kwup standby clear request to "active" (refer to intcg register). imcgd = "1" : set the kw up clear input to "enable" (refer to intcg register). imc3 = "01" : set kwup interrupt request to the h level (refer to intc register). imc3 = "01" : clear kwup interrupt request (refer to intcg register). intclr = "000110100" : clear kwup interrupt request (refer to intcg register). kwupst = "1" : set each kwup interrupt factor to enable (refer to kwup register). table 6.1.2 registers to be set for detecting interrupts interrupt interrupt detection levels that can be used int0 - intb,kwup when in use, set to a rising edge in intc (if e dge detection is set for cg) or to "h" level (if level detection is set for cg). set the active state in cg. the "l" level, "h" level, falling edge, or rising edge setting can be se lected in cg register. internal i/o others falling edge (note 1) interrupt level 0 means that the interrupt is disabled.
tmp19a64c1d tmp19a64(rev1.1) 6-4 (3) interrupt operation z basic interrupt handling { in the interrupt handler (refer to table 6.2.1 interrupt jump address for the starting address of the interrupt handler): ? read the ivr value (in the figure, ivr value is 0x8000) ? substitute the ivr value for iclr to clear the interrupt factor. ? obtain the exception handling jump address by using the ivr value (in the figure, it is 0x8000) as the corresponding address in the table (in the figure, the "jump to" address is 0x9000). ? jump to the exception handling routine using the "jump to" address. { in the interrupt processing routine: ? execute the interrupt processing ? set ilev = 0 to return to the mask level before the exception is generated. ? command "eret" to return to the routine before the exception is generated. note that interrupts are disabled during the exception handling except for the case multiple interrupts are allowed. fig. 6.1.3 process flow in the interrupt handler memory ivr 0x8000 0x8000 0x9000 0x9000 exception handle r
tmp19a64c1d tmp19a64(rev1.1) 6-5 6.2 interrupt factor the starting address of an exception handler is defined as "exception vector address." the exception vector address for a reset exceptio n and non-maskable interrupts is 0xbfc0_0000. the exception vector address for a debug exception is 0xbfc0_0480 (ejtag proben = 0). for other exceptions, the corresponding exception vector addresses are determined depending on the bev bit of status register [23] and the iv bit of the cause register [23] of the system control coprocessor register (cp0). table 6.2.1 interrupt branch address bev=0 bev=1 exception virtual address logical address virtual address logical address reset 0xbfc0_0000 0x1fc0_0000 0xbfc0_0000 0x1fc0_0000 ejtag debug (en=0) 0xbfc0_0480 0x1fc0_0480 0xbfc0_0480 0x1fc0_0480 ejtag debug (en=1) 0xff20_0200 0xff20_0200 0xff20_0200 0xff20_0200 interrupt (iv=0) 0x8000_0180 0x0000_0180 0xbfc0_0380 0x1fc0_0380 interrupt (iv=1) 0x8000_0200 0x0000_0200 0xbfc0_0400 0x1fc0_0400 all others 0x8000_0180 0x0000_0180 0xbfc0_0380 0x1fc0_0380 (note 1) if vector addresses are to be placed in the internal rom, set the status bit of the system control coprocessor register (cp0) to "1." (note 2) the "software interrupt," which is a maskable interrupt, can be generated by setting ip [1:0] of the cause register of cp0. this "software interr upt" is different from th e "software set," which is one of the hardware interrupt factors. the "software set" interrupt is generated by setting of the imc0 register in the interrupt controller (intc) to any value other than "0."
tmp19a64c1d tmp19a64(rev1.1) 6-6 table 6.2.2 list of hardware interrupt factors interrupt number ivr[8:0] interrupt factor interrupt control register address 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 0x000 0x004 0x008 0x00c 0x010 0x014 0x018 0x01c 0x020 0x024 0x028 0x02c 0x030 0x034 0x038 0x03c 0x040 0x044 0x048 0x04c 0x050 0x054 0x058 0x05c 0x060 0x064 0x068 0x06c 0x070 0x074 0x078 0x07c 0x080 0x084 0x088 0x08c 0x090 0x094 0x098 0x09c 0x0a0 0x0a4 0x0a8 0x0ac 0x0b0 0x0b4 0x0b8 0x0bc 0x0c0 0x0c4 0x0c8 0x0cc 0x0d0 0x0d4 0x0d8 0x0dc 0x0e0 0x0e4 0x0e8 0x0ec 0x0f0 0x0f4 0x0f8 0x0fc software set int0 pin int1 pin int2 pin int3 pin int4 pin int5 pin int6 pin int7 pin int8 pin int9 pin inta pin intb pin kwup intrx0 : serial receiving (channel.0) inttx0 : serial transmit (channel.0) intrx1 : serial receiving (channel.1) inttx1 : serial transmit (channel.1) intrx2 : serial receiving (channel.2) inttx2 : serial transmit (channel.2) intsbi : serial bus interface 0 intadhp : highest priority adc complete interrupt intadm : adc monitor function interrupt inttb0 : 16-bit timer 0 inttb1 : 16-bit timer 1 inttb2 : 16-bit timer 2 inttb3 : 16-bit timer 3 inttb4 : 16-bit timer 4 intcapg : input capture group intcmp0 : compare interrupt 0 intcmp1 : compare interrupt 1 intcmp2 : compare interrupt 2 intcmp3 : compare interrupt 3 intcmp4 : compare interrupt 4 reserved intrx3 : serial receiving (channel.3) inttx3 : serial transmit (channel.3) intrx4 : serial receiving (channel.4) inttx4 : serial transmit (channel.4) intrx5 : serial receiving (channel.5) inttx5 : serial transmit (channel.5) intrx6 : serial receiving (channel.6) inttx6 : serial transmit (channel.6) inttb5 : 16-bit timer 5 inttb6 : 16-bit timer 6 inttb7 : 16-bit timer 7 inttb8 : 16-bit timer 8 inttb9 : 16-bit timer 9 inttba : 16-bit timer a intcmp5 : compare interrupt 5 intcmp6 : compare interrupt 6 intcmp7 : compare interrupt 7 intcmp8 : compare interrupt 8 intcmp9 : compare interrupt 9 intrtc : clock timer intad : adc completed intdma0 : completion of dma transfer (channel.0) intdma1 : completion of dma transfer (channel.1) intdma2 : completion of dma transfer (channel.2) intdma3 : completion of dma transfer (channel.3) intdma4 : completion of dma transfer (channel.4) intdma5 : completion of dma transfer (channel.5) intdma6 : completion of dma transfer (channel.6) intdma7 : completion of dma transfer (channel.7) imc0 imc1 imc2 imc3 imc4 imc5 imc6 imc7 imc8 imc9 imca imcb imcc imcd imce imcf 0xffff_e000 0xffff_e004 0xffff_e008 0xffff_e00c 0xffff_e010 0xffff_e014 0xffff_e018 0xffff_e01c 0xffff_e020 0xffff_e024 0xffff_e028 0xffff_e02c 0xffff_e030 0xffff_e034 0xffff_e038 0xffff_e03c
tmp19a64c1d tmp19a64(rev1.1) 6-7 table 6.2.3 interrupt factors to cancel stop/sleep/idle modes number interrupt factor note 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 int0 int1 int2 int3 int4 int5 int6 int7 int8 int9 inta intb kwup intrtc inttba reserved external interrupt 0 external interrupt 1 external interrupt 2 external interrupt 3 external interrupt 4 external interrupt 5 external interrupt 6 external interrupt 7 external interrupt 8 external interrupt 9 external interrupt a external interrupt b key on wake up interrupt clock timer interrupt two-phase pulse input counter interrupt * number 0 to 13 interrupt factors can cancel stop/sleep modes. * number 14 interrupt factor can cancel the sleep mode. * each factor can clear the idle mode.
tmp19a64c1d tmp19a64(rev1.1) 6-8 6.3 interrupt detection if any interrupt is used to cancel the stop mode, interrupt active states of int0 to intb must be set in the emcgxx field of the imcgx register in cg and the eimxx of the imcx register in intc must be set to "h" level. for kwup0 to 7, the emcg field of the imcgd re gister in cg must be set to "h" and the eimxx field of the imcx register in intc must be set to "h" leve l. the active state as well as enable/disable is set in kwupstn for each interrupt. for setting ot her interrupts, the eimxx field of th e imcx register in intc is used. four types of active states, "h" level, "l" level, rising edge, and falling edge, are used. when the interrupt detection circuit of tmp19a64 recogni zes that any input state matches w ith the predefined active state, it notifies the processor core or intc of an interrupt request. if the interrupts that can be used to cancel the stop mode are not to be used for canceling stop mode, it is unnecessary to configure them in cg. in this case, int0 to intb can be set only by intc and kwup 0 to 7 can be set in intc and kwupstx. the interrupt signal is negated by the interrupt handler after the interrupt factor is identified. in the case of int0 to intb, appropriate values are wr itten to the icrcg field of the eicrcg register and to the eiclr field of the intclr register in intc. kwup0 to 7 are negated by setting kwupclr. other interrupt signals are negated by writing a given value in the eiclr field of the intclr register in the intc. to negate the interrupt factor whose active state is level- sensitive, an external circuit that has asserted the intx signal must be operated so that it negates intx. however, please ensure that the level input is not negated until the specified interrupt vect or (ivr) has been read. (note) please ensure that each setting is performed in the order of setting the active state, clearing an interrupt request, and enabling an interrupt. (example int0 setting to cancel stop mode) imcga = "10" : set int0 active state to falling edge. eicrcg = "0000" : clear the int0 interrupt request. imcga = "1" : enable int0 cancel input. imc0 = "01" : set int0 to "h" level. intclr = "000000100" : clear the int0 interrupt request. imc0 = "101" : set the interrupt level of "5." status = "1," = "xxx" tx19a processor core
tmp19a64c1d tmp19a64(rev1.1) 6-9 6.4 interrupt priority arbitration (1) seven levels of interrupt priority seven levels of priority are available and each interrupt factor can be assigned to one of these levels. the interrupt level is set by the interrupt mode cont rol register (imcx) which has a 3-bit field (ilx) for level settings. the greater the value (interrupt level) set in imcx , the higher the priority. if the value is set to "000" meaning the interrupt level of 0, no interrupts will be generated by the factor. (2) interrupt level notification if an interrupt is generated, the intc notifies th e tx19a processor core of the interrupt level. the tx19a processor core identifies the interrupt level by reading the values in the ip field in the cause register. if two or more interrupts (with different interrupt levels) are generated simultaneously, the intc notifies the tx19a processor core of the hi ghest-level interrupt factor and the lower level interrupt factors are suspended. (3) interrupt vector (notification of interrupt factor) if an interrupt is generated, the intc sets the corresponding interrupt factor vector in the vector register (ivr). the tx19a processor core identifies the interrupt factor by reading the vector register value. if two or more interrupts (with the same interrupt le vel) are generated simultaneously, the intc notifies the tx19a processor core of the factor of which request number is younger. when no interrupt factors have been generated, the ivr <8:2> field is "0" (by clearing interrupt requests, the ivr register is cleared to "0.")
tmp19a64c1d tmp19a64(rev1.1) 6-10 6.5 intc register table 6.5.1 intc register map address register symbol register corresponding interrupt number 0xffff_e000 imc0 interrupt mode control register 0 3 - 0 0xffff_e004 imc1 interrupt mode control register 1 7 - 4 0xffff_e008 imc2 interrupt mode control register 2 11 - 8 0xffff_e00c imc3 interrupt mode control register 3 15 - 12 0xffff_e010 imc4 interrupt mode control register 4 19 - 16 0xffff_e014 imc5 interrupt mode control register 5 23 - 20 0xffff_e018 imc6 interrupt mode control register 6 27 - 24 0xffff_e01c imc7 interrupt mode control register 7 31 - 28 0xffff_e020 imc8 interrupt mode control register 8 35 - 32 0xffff_e024 imc9 interrupt mode control register 9 39 - 36 0xffff_e028 imca interrupt mode control register a 43 - 40 0xffff_e02c imcb interrupt mode control register b 47 - 44 0xffff_e030 imcc interrupt mode control register c 51 - 48 0xffff_e034 imcd interrupt mode control register d 55 - 52 0xffff_e038 imce interrupt mode control register e 59 - 56 0xffff_e03c imcf interrupt m ode control register f 63 - 60 0xffff_e040 ivr interrupt vector register 0xffff_e060 intclr interrupt request clear register 0xffff_e10c ilev interrupt level register (note) unless otherwise specified, the abov e registers must be 32-bit accessed for both reading and writing.
tmp19a64c1d tmp19a64(rev1.1) 6-11 6.5.1 interrupt vector register (ivr) the vector of each interrupt factor to be generated is listed below. 7 6 5 4 3 2 1 0 ivr bit symbol ivr7 ivr6 ivr5 ivr4 ivr3 ivr2 ivr1 ivr0 (0xffff_e040) read/write r after reset 0 0 0 0 0 0 0 0 function the vector of the interrupt factor generated is set. 15 14 13 12 11 10 9 8 bit symbol ivr8 read/write r/w r after reset 0 0 0 0 0 0 0 0 function the vector of the interrupt factor generated is set. 23 22 21 20 19 18 17 16 bit symbol read/write r/w after reset 0 0 0 0 0 0 0 0 function 31 30 29 28 27 26 25 24 bit symbol read/write r/w after reset 0 0 0 0 0 0 0 0 function
tmp19a64c1d tmp19a64(rev1.1) 6-12 6.5.2 interrupt level register 7 6 5 4 3 2 1 0 ilev bit symbol D pmask0 D cmask (0xffff_e10c) read/write r r/w (note 1) after reset 0 000 0 000 function always reads "0." interrupt mask level (previous) 0 always reads "0." interrupt mask level (current) 15 14 13 12 11 10 9 8 bit symbol D pmask2 D pmask1 read/write r after reset 0 000 0 000 function always reads "0." interrupt mask level (previous) 2 always reads "0." interrupt mask level (previous) 1 23 22 21 20 19 18 17 16 bit symbol D pmask4 D pmask3 read/write r after reset 0 000 0 000 function always reads "0." interrupt mask level (previous) 4 always reads "0." interrupt mask level (previous) 3 31 30 29 28 27 26 25 24 bit symbol mlev pmask6 D pmask5 read/write w r after reset 0 000 0 000 function interrupt level change 0: decrement the interrupt level by 1 1: change cmask interrupt mask level (previous) 6 always reads "0." interrupt mask level (previous) 5 note) this register must be 32-bit accessed. note) when a new interrupt is generated, the corres ponding interrupt level is stored in cmask and any previously stored values are shifted in their mask levels such that the previous cmask is saved in pmask0 and pmask0 is saved in pmask1 and so on. note 1) upon setting mlev to "1," set the cmask value simultaneously. the pmaskx values are unchanged. note) when is set to "0," the interrupt mask le vels in the register shift back to the previous state such that pmask0 is moved to cmask and pmask1 is moved to pmask0, and so on. the last is set to "000." if it is to be used af ter the interrupt process, set mlev to "0" before executing the eret command.
tmp19a64c1d tmp19a64(rev1.1) 6-13 6.5.3 transition of interrupt mask level the transition sequence of the interrupt level register is illustrated below. fig. 6.5.3 transition of interrupt mask level pmask6 pmask5 pmask4 pmask3 pmask2 pmask1 pmask0 cmask new interrupt level pmask6 pmask5 pmask4 pmask3 pmask2 pmask1 pmask0 cmask pmask6 pmask5 pmask4 pmask3 pmask2 pmask1 pmask0 cmask "000" interrupt processing mlev="0"
tmp19a64c1d tmp19a64(rev1.1) 6-14 6.5.4 interrupt level register (imcx) the interrupt level, active state, and whether it is a f actor to activate dmac or not are set for each interrupt factor. 7 6 5 4 3 2 1 0 imc0 bit symbol eim01 eim00 dm0 il02 il01 il00 (0xffff_e000) read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request: 00: "l" level 01: disable 10: disable 11: disable be sure to set "00." set as dmac activation factor. 0: non- activation factor 1: interrupt number 0 is set as the activation factor always reads "0." if dm0 = 0, select the interrupt level for interrupt number 0 (software set). 000: disable interrupt 001 to 111: 1 to 7 if dm0 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 15 14 13 12 11 10 9 8 bit symbol eim11 eim10 dm1 il12 il11 il10 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 00: "l" level 01: "h" level 10: falling edge 11: rising edge set as dmac activation factor. 0: non- activation factor 1: interrupt number 1 to be the activation factor. always reads "0." if dm1 = 0, select the interrupt level for interrupt number 1 (int0). 000: disable interrupt 001 to 111: 1 to 7 if dm1 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 23 22 21 20 19 18 17 16 bit symbol eim21 eim20 dm2 il22 il21 il20 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 00: "l" level 01: "h" level 10: falling edge 11: rising edge set as dmac activation factor. 0: non- activation factor 1: interrupt number 2 to be the activation factor. always reads "0." if dm2 = 0, select the interrupt level for interrupt number 2 (int1). 000: disable interrupt 001 to 111: 1 to 7 if dm2 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 31 30 29 28 27 26 25 24 bit symbol eim31 eim30 dm3 il32 il31 il30 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 00: "l" level 01: "h" level 10: falling edge 11: rising edge set as dmac activation factor. 0: non- activation factor 1: interrupt number 3 to be the activation factor. always reads "0." if dm3 = 0, select the interrupt level for interrupt number 3 (int2). 000: disable interrupt 001 to 111: 1 to 7 if dm3 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
tmp19a64c1d tmp19a64(rev1.1) 6-15 7 6 5 4 3 2 1 0 imc1 bit symbol eim41 eim40 dm4 il42 il41 il40 (0xffff_e004) read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 00: "l" level 01: "h" level 10: falling edge 11: rising edge set as dmac activation factor. 0: non- activation factor 1: interrupt number 4 is set as the activation factor always reads "0." if dm4 = 0, select the interrupt level for interrupt number 4 (int3) 000: disable interrupt 001 to 111: 1 to 7 if dm4 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 15 14 13 12 11 10 9 8 bit symbol eim51 eim50 dm5 il52 il51 il50 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 00: "l" level 01: "h" level 10: falling edge 11: rising edge set as dmac activation factor. 0: non- activation factor 1: interrupt number 5 to be the activation factor. always reads "0." if dm5 = 0, select the interrupt level for interrupt number 5 (int4). 000: disable interrupt 001 to 111: 1 to 7 if dm5 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 23 22 21 20 19 18 17 16 bit symbol eim61 eim60 dm6 il62 il61 il60 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 00: "l" level 01: "h" level 10: falling edge 11: rising edge set as dmac activation factor. 0: non- activation factor 1: interrupt number 6 to be the activation factor. always reads "0." if dm6 = 0, select the interrupt level for interrupt number 6 (int5). 000: disable interrupt 001 to 111: 1 to 7 if dm6 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 31 30 29 28 27 26 25 24 bit symbol eim71 eim70 dm7 il72 il71 il70 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 00: "l" level 01: "h" level 10: falling edge 11: rising edge set as dmac activation factor. 0: non- activation factor 1: interrupt number 7 to be the activation factor. always reads "0." if dm7 = 0, select the interrupt level for interrupt number 7 (int6). 000: disable interrupt 001 to 111: 1 to 7 if dm7 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
tmp19a64c1d tmp19a64(rev1.1) 6-16 7 6 5 4 3 2 1 0 imc2 bit symbol eim81 eim80 dm8 il82 il81 il80 (0xffff_e008) read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 00: "l" level 01: "h" level 10: falling edge 11: rising edge set as dmac activation factor. 0: non- activation factor 1: interrupt number 8 is set as the activation factor always reads "0." if dm8 = 0, select the interrupt level for interrupt number 8 (int7). 000: disable interrupt 001 to 111: 1 to 7 if dm8 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 15 14 13 12 11 10 9 8 bit symbol eim91 eim90 dm9 il92 il91 il90 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 00: "l" level 01: "h" level 10: falling edge 11: rising edge set as dmac activation factor. 0: non- activation factor 1: interrupt number 9 to be the activation factor. always reads "0." if dm9 = 0, select the interrupt level for interrupt number 9 (int8). 000: disable interrupt 001 to 111: 1 to 7 if dm9 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 23 22 21 20 19 18 17 16 bit symbol eima1 eima0 dma ila2 ila1 ila0 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 00: "l" level 01: "h" level 10: falling edge 11: rising edge set as dmac activation factor. 0: non- activation factor 1: interrupt number 10 to be the activation factor. always reads "0." if dma = 0, select the interrupt level for interrupt number 10 (int9). 000: disable interrupt 001 to 111: 1 to 7 if dma = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 31 30 29 28 27 26 25 24 bit symbol eimb1 eimb0 dmb ilb2 ilb1 ilb0 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 00: "l" level 01: "h" level 10: falling edge 11: rising edge set as dmac activation factor. 0: non- activation factor 1: interrupt number 11 to be the activation factor. always reads "0." if dmb = 0, select the interrupt level for interrupt number 11 (inta) 000: disable interrupt 001 to 111: 1 to 7 if dmb = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
tmp19a64c1d tmp19a64(rev1.1) 6-17 7 6 5 4 3 2 1 0 imc3 bit symbol eimc1 eimc0 dmc ilc2 ilc1 ilc0 (0xffff_e00c) read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 00: "l" level 01: "h" level 10: falling edge 11: rising edge set as dmac activation factor. 0: non- activation factor 1: interrupt number 12 is set as the activation factor always reads "0." if dmc = 0, select the interrupt level for interrupt number 12 (intb) 000: disable interrupt 001 to 111: 1 to 7 if dmc = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 15 14 13 12 11 10 9 8 bit symbol eimd1 eimd0 dmd ild2 ild1 ild0 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 01: "h" level be sure to set "01." set as dmac activation factor. 0: non- activation factor 1: interrupt number 13 to be the activation factor. always reads "0." if dmd = 0, select the interrupt level for interrupt number 13 (kwup) 000: disable interrupt 001 to 111: 1 to 7 if dmd = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 23 22 21 20 19 18 17 16 bit symbol eime1 eime0 dme ile2 ile1 ile0 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 14 to be the activation factor. always reads "0." if dme = 0, select the interrupt level for interrupt number 14 (intrx0) 000: disable interrupt 001 to 111: 1 to 7 if dme = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 31 30 29 28 27 26 25 24 bit symbol eimf1 eimf0 dmf ilf2 ilf1 ilf0 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 15 to be the activation factor. always reads "0." if dmf = 0, select the interrupt level for interrupt number 15 (inttx0) 000: disable interrupt 001 to 111: 1 to 7 if dmf = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7
tmp19a64c1d tmp19a64(rev1.1) 6-18 7 6 5 4 3 2 1 0 imc4 bit symbol eim101 eim100 dm10 il102 il101 il100 (0xffff_e010) read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 16 is set as the activation factor always reads "0." if dm10 = 0, select the interrupt level for interrupt number 16 (intrx1) 000: disable interrupt 001 to 111: 1 to 7 if dm10 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 15 14 13 12 11 10 9 8 bit symbol eim111 eim110 dm11 il112 il111 il110 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 17 to be the activation factor. always reads "0." if dm11 = 0, select the interrupt level for interrupt number 17 (inttx1) 000: disable interrupt 001 to 111: 1 to 7 if dm11 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 23 22 21 20 19 18 17 16 bit symbol eim121 eim120 dm12 il122 il121 il120 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 18 to be the activation factor. always reads "0." if dm12 = 0, select the interrupt level for interrupt number 18 (intrx2). 000: disable interrupt 001 to 111: 1 to 7 if dm12 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 31 30 29 28 27 26 25 24 bit symbol eim131 eim130 dm13 il132 il131 il130 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 19 to be the activation factor. always reads "0." if dm13 = 0, select the interrupt level for interrupt number 19 (inttx2) 000: disable interrupt 001 to 111: 1 to 7 if dm13 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 note: default values of eimxx0 and eimxx1 are different from the values to be used. properly set them to the specified values before use.
tmp19a64c1d tmp19a64(rev1.1) 6-19 7 6 5 4 3 2 1 0 imc5 bit symbol eim141 eim140 dm14 il142 il141 il140 (0xffff_e014) read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 20 is set as the activation factor always reads "0." if dm14 = 0, select the interrupt level for interrupt number 20 (intsb1). 000: disable interrupt 001 to 111: 1 to 7 if dm14 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 15 14 13 12 11 10 9 8 bit symbol eim151 eim150 dm15 il152 il151 il150 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 21 to be the activation factor. always reads "0." if dm15 = 0, select the interrupt level for interrupt number 21 (intadhp) 000: disable interrupt 001 to 111: 1 to 7 if dm15 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 23 22 21 20 19 18 17 16 bit symbol eim161 eim160 dm16 il162 il161 il160 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 22 to be the activation factor. always reads "0." if dm16 = 0, select the interrupt level for interrupt number 22 (intadm). 000: disable interrupt 001 to 111: 1 to 7 if dm16 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 31 30 29 28 27 26 25 24 bit symbol eim171 eim170 dm17 il172 il171 il170 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 23 to be the activation factor. always reads "0." if dm17 = 0, select the interrupt level for interrupt number 23 (inttb0). 000: disable interrupt 001 to 111: 1 to 7 if dm17 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 note: default values of eimxx0 and eimxx1 are different from the values to be used. properly set them to the specified values before use.
tmp19a64c1d tmp19a64(rev1.1) 6-20 7 6 5 4 3 2 1 0 imc6 bit symbol eim181 eim180 dm18 il182 il181 il180 (0xffff_e018) read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 24 is set as the activation factor always reads "0." if dm18 = 0, select the interrupt level for interrupt number 24 (inttb1). 000: disable interrupt 001 to 111: 1 to 7 if dm18 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 15 14 13 12 11 10 9 8 bit symbol eim191 eim190 dm19 il192 il191 il190 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 25 to be the activation factor. always reads "0." if dm19 = 0, select the interrupt level for interrupt number 25 (inttb2). 000: disable interrupt 001 to 111: 1 to 7 if dm19 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 23 22 21 20 19 18 17 16 bit symbol eim1a1 eim1a0 dm1a il1a2 il1a1 il1a0 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 26 to be the activation factor. always reads "0." if dm1a = 0, select the interrupt level for interrupt number 26 (inttb3). 000: disable interrupt 001 to 111: 1 to 7 if dm1a = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 31 30 29 28 27 26 25 24 bit symbol eim1b1 eim1b0 dm1b il1b2 il1b1 il1b0 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 27 to be the activation factor. always reads "0." if dm1b = 0, select the interrupt level for interrupt number 27 (inttb4). 000: disable interrupt 001 to 111: 1 to 7 if dm1b = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 note: default values of eimxx0 and eimxx1 are different from the values to be used. properly set them to the specified values before use.
tmp19a64c1d tmp19a64(rev1.1) 6-21 7 6 5 4 3 2 1 0 imc7 bit symbol eim1c1 eim1c0 dm1c il1c2 il1c1 il1c0 (0xffff_e01c) read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 28 to be the activation factor. always reads "0." if dm1c = 0, select the interrupt level for interrupt number 28 (intcapg). 000: disable interrupt 001 to 111: 1 to 7 if dm1c = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 15 14 13 12 11 10 9 8 bit symbol eim1d1 eim1d0 dm1d il1d2 il1d1 il1d0 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 29 to be the activation factor. always reads "0." if dm1d = 0, select the interrupt level for interrupt number 29 (intcomp0). 000: disable interrupt 001 to 111: 1 to 7 if dm1d = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 23 22 21 20 19 18 17 16 bit symbol eim1e1 eim1e0 dm1e il1e2 il1e1 il1e0 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 30 to be the activation factor. always reads "0." if dm1e = 0, select the interrupt level for interrupt number 30 (intcmp1). 000: disable interrupt 001 to 111: 1 to 7 if dm1e = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 31 30 29 28 27 26 25 24 bit symbol eim1f1 eim1f0 dm1f il1f2 il1f1 il1f0 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 31 to be the activation factor. always reads "0." if dm1f = 0, select the interrupt level for interrupt number 31 (intcmp2) 000: disable interrupt 001 to 111: 1 to 7 if dm1f = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 note: default values of eimxx0 and eimxx1 are different from the values to be used. properly set them to the specified values before use.
tmp19a64c1d tmp19a64(rev1.1) 6-22 7 6 5 4 3 2 1 0 imc8 bit symbol eim201 eim200 dm20 il202 il201 il200 (0xffff_e020) read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 32 to be the activation factor. always reads "0." if dm20 = 0, select the interrupt level for interrupt number 32 (intcmp3) 000: disable interrupt 001 to 111: 1 to 7 if dm20 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 15 14 13 12 11 10 9 8 bit symbol eim211 eim210 dm21 il212 il211 il210 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 33 to be the activation factor. always reads "0." if dm21 = 0, select the interrupt level for interrupt number 33 (intcmp4). 000: disable interrupt 001 to 111: 1 to 7 if dm21 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 23 22 21 20 19 18 17 16 bit symbol eim221 eim220 dm26 il222 il221 il220 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." be sure to set "00." be sure to set "0." always reads "0." be sure to set "00." 31 30 29 28 27 26 25 24 bit symbol eim231 eim230 dm23 il232 il231 il230 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 35 to be the activation factor. always reads "0." if dm23 = 0, select the interrupt level for interrupt number 35 (intrx3) 000: disable interrupt 001 to 111: 1 to 7 if dm23 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 note: default values of eimxx0 and eimxx1 are different from the values to be used. properly set them to the specified values before use.
tmp19a64c1d tmp19a64(rev1.1) 6-23 7 6 5 4 3 2 1 0 imc9 bit symbol eim241 eim240 dm24 il242 il241 il240 (0xffff_e024) read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 36 to be the activation factor. always reads "0." if dm24 = 0, select the interrupt level for interrupt number 36 (inttx3). 000: disable interrupt 001 to 111: 1 to 7 if dm24 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 15 14 13 12 11 10 9 8 bit symbol eim251 eim250 dm25 il252 il251 il250 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 37 to be the activation factor. always reads "0." if dm25 = 0, select the interrupt level for interrupt number 37 intrx4). 000: disable interrupt 001 to 111: 1 to 7 if dm25 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 23 22 21 20 19 18 17 16 bit symbol eim261 eim260 dm26 il262 il261 il260 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 38 to be the activation factor. always reads "0." if dm26 = 0, select the interrupt level for interrupt number 38 (inttx4). 000: disable interrupt 001 to 111: 1 to 7 if dm26 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 31 30 29 28 27 26 25 24 bit symbol eim271 eim270 dm27 il272 il271 il270 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 39 to be the activation factor. always reads "0." if dm27 = 0, select the interrupt level for interrupt number 39 (intrx5). 000: disable interrupt 001 to 111: 1 to 7 if dm27 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 note: default values of eimxx0 and eimxx1 are different from the values to be used. properly set them to the specified values before use.
tmp19a64c1d tmp19a64(rev1.1) 6-24 7 6 5 4 3 2 1 0 imca bit symbol eim281 eim280 dm28 il282 il281 il280 (0xffff_e028) read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 40 to be the activation factor. always reads "0." if dm28 = 0, select the interrupt level for interrupt number 40 (inttx5). 000: disable interrupt 001 to 111: 1 to 7 if dm28 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 15 14 13 12 11 10 9 8 bit symbol eim291 eim290 dm29 il292 il291 il290 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 41 to be the activation factor. always reads "0." if dm29 = 0, select the interrupt level for interrupt number 41 (intrx6). 000: disable interrupt 001 to 111: 1 to 7 if dm29 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 23 22 21 20 19 18 17 16 bit symbol eim2a1 eim2a0 dm2a il2a2 il2a1 il2a0 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 42 to be the activation factor. always reads "0." if dm2a = 0, select the interrupt level for interrupt number 42 (inttx6). 000: disable interrupt 001 to 111: 1 to 7 if dm2a = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 31 30 29 28 27 26 25 24 bit symbol eim2b1 eim2b0 dm2b il2b2 il2b1 il2b0 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 43 to be the activation factor. always reads "0." if dm2b = 0, select the interrupt level for interrupt number 43 (inttb5). 000: disable interrupt 001 to 111: 1 to 7 if dm2b = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 note: default values of eimxx0 and eimxx1 are different from the values to be used. properly set them to the specified values before use.
tmp19a64c1d tmp19a64(rev1.1) 6-25 7 6 5 4 3 2 1 0 imcb bit symbol eim2c1 eim2c0 dm2c il2c2 il2c1 il2c0 (0xffff_e02c) read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 44 to be the activation factor. always reads "0." if dm2c = 0, select the interrupt level for interrupt number 44 (inttb6). 000: disable interrupt 001 to 111: 1 to 7 if dm2c = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 15 14 13 12 11 10 9 8 bit symbol eim2d1 eim2d0 dm2d il2d2 il2d1 il2d0 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 45 to be the activation factor. always reads "0." if dm2d = 0, select the interrupt level for interrupt number 45 (inttb7). 000: disable interrupt 001 to 111: 1 to 7 if dm2d = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 23 22 21 20 19 18 17 16 bit symbol eim2e1 eim2e0 dm2e il2e2 il2e1 il2e0 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 46 to be the activation factor. always reads "0." if dm2e = 0, select the interrupt level for interrupt number 46 (inttb8). 000: disable interrupt 001 to 111: 1 to 7 if dm2e = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 31 30 29 28 27 26 25 24 bit symbol eim2f1 eim2f0 dm2f il2f2 il2f1 il2f0 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 47 to be the activation factor. always reads "0." if dm2f = 0, select the interrupt level for interrupt number 47 (inttb9). 000: disable interrupt 001 to 111: 1 to 7 if dm2f = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 note: default values of eimxx0 and eimxx1 are different from the values to be used. properly set them to the specified values before use.
tmp19a64c1d tmp19a64(rev1.1) 6-26 7 6 5 4 3 2 1 0 imcc bit symbol eim301 eim300 dm30 il302 il301 il300 (0xffff_e030) read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 01: "h" level be sure to set "01." set as dmac activation factor. 0: non- activation factor 1: interrupt number 48 to be the activation factor. always reads "0." if dm30 = 0, select the interrupt level for interrupt number 48 (inttba). 000: disable interrupt 001 to 111: 1 to 7 if dm30 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 15 14 13 12 11 10 9 8 bit symbol eim311 eim310 dm31 il312 il311 il310 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 1: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 49 to be the activation factor. always reads "0." if dm31 = 0, select the interrupt level for interrupt number 49 (intcmp5) 000: disable interrupt 001 to 111: 1 to 7 if dm31 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 23 22 21 20 19 18 17 16 bit symbol eim321 eim320 dm32 il322 il321 il320 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 1: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 50 to be the activation factor. always reads "0." if dm32 = 0, select the interrupt level for interrupt number 50 (intcmp6) 000: disable interrupt 001 to 111: 1 to 7 if dm32 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 31 30 29 28 27 26 25 24 bit symbol eim331 eim330 dm33 il332 il331 il330 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 51 to be the activation factor. always reads "0." if dm33 = 0, select the interrupt level for interrupt number 51 (intcmp7) 000: disable interrupt 001 to 111: 1 to 7 if dm33 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 note: default values of eimxx0 and eimxx1 are different from the values to be used. properly set them to the specified values before use.
tmp19a64c1d tmp19a64(rev1.1) 6-27 7 6 5 4 3 2 1 0 imcd bit symbol eim341 eim340 dm34 il342 il341 il340 (0xffff_e034) read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 52 to be the activation factor. always reads "0." if dm34 = 0, select the interrupt level for interrupt number 52 (intcmp8) 000: disable interrupt 001 to 111: 1 to 7 if dm34 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 15 14 13 12 11 10 9 8 bit symbol eim351 eim350 dm35 il352 il351 il350 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 53 to be the activation factor. always reads "0." if dm35 = 0, select the interrupt level for interrupt number 53 (intcmp9) 000: disable interrupt 001 to 111: 1 to 7 if dm35 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 23 22 21 20 19 18 17 16 bit symbol eim361 eim360 dm36 il362 il361 il360 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 01: "h" level be sure to set "01." set as dmac activation factor. 0: non- activation factor 1: interrupt number 54 to be the activation factor. always reads "0." if dm36 = 0, select the interrupt level for interrupt number 54 (intrtc) 000: disable interrupt 001 to 111: 1 to 7 if dm36 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 31 30 29 28 27 26 25 24 bit symbol eim371 eim370 dm37 il372 il371 il370 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 11: rising edge be sure to set "11." set as dmac activation factor. 0: non- activation factor 1: interrupt number 55 to be the activation factor. always reads "0." if dm37 = 0, select the interrupt level for interrupt number 55 (intad) 000: disable interrupt 001 to 111: 1 to 7 if dm37 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 note: default values of eimxx0 and eimxx1 are different from the values to be used. properly set them to the specified values before use.
tmp19a64c1d tmp19a64(rev1.1) 6-28 7 6 5 4 3 2 1 0 imce bit symbol eim381 eim380 dm38 il382 il381 il380 (0xffff_e038) read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 10: falling edge be sure to set "10." set as dmac activation factor. 0: non- activation factor 1: interrupt number 56 to be the activation factor. always reads "0." if dm38 = 0, select the interrupt level for interrupt number 56 (intdma0) 000: disable interrupt 001 to 111: 1 to 7 if dm38 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 15 14 13 12 11 10 9 8 bit symbol eim391 eim390 dm39 il392 il391 il390 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 10: falling edge be sure to set "10." set as dmac activation factor. 0: non- activation factor 1: interrupt number 57 to be the activation factor. always reads "0." if dm39 = 0, select the interrupt level for interrupt number 57 (intdm1) 000: disable interrupt 001 to 111: 1 to 7 if dm39 = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 23 22 21 20 19 18 17 16 bit symbol eim3a1 eim3a0 dm3a il3a2 il3a1 il3a0 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 10: falling edge be sure to set "10." set as dmac activation factor. 0: non- activation factor 1: interrupt number 58 to be the activation factor. always reads "0." if dm3a = 0, select the interrupt level for interrupt number 58 (intdma2) 000: disable interrupt 001 to 111: 1 to 7 if dm3a = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 31 30 29 28 27 26 25 24 bit symbol eim3b1 eim3b0 dm3b il3b2 il3b1 il3b0 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 10: falling edge be sure to set "10." set as dmac activation factor. 0: non- activation factor 1: interrupt number 59 to be the activation factor. always reads "0." if dm3b = 0, select the interrupt level for interrupt number 59 (intdma3). 000: disable interrupt 001 to 111: 1 to 7 if dm3b = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 note: default values of eimxx0 and eimxx1 are different from the values to be used. properly set them to the specified values before use.
tmp19a64c1d tmp19a64(rev1.1) 6-29 7 6 5 4 3 2 1 0 imcf bit symbol eim3c1 eim3c0 dm3c il3c2 il3c1 il3c0 (0xffff_e03c) read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 10: falling edge be sure to set "10." set as dmac activation factor. 0: non- activation factor 1: interrupt number 60 to be the activation factor. always reads "0." if dm3c = 0, select the interrupt level for interrupt number 60 (intdma4) 000: disable interrupt 001 to 111: 1 to 7 if dm3c = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 15 14 13 12 11 10 9 8 bit symbol eim3d1 eim3d0 dm3d il3d2 il3d1 il3d0 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 10: falling edge be sure to set "10." set as dmac activation factor. 0: non- activation factor 1: interrupt number 61 to be the activation factor. always reads "0." if dm3d = 0, select the interrupt level for interrupt number 61 (intdma5) 000: disable interrupt 001 to 111: 1 to 7 if dm3d = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 23 22 21 20 19 18 17 16 bit symbol eim3e1 eim3e0 dm3e il3e2 il3e1 il3e0 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 10: falling edge be sure to set "10." set as dmac activation factor. 0: non- activation factor 1: interrupt number 62 to be the activation factor. always reads "0." if dm3e = 0, select the interrupt level for interrupt number 62 (intdma6). 000: disable interrupt 001 to 111: 1 to 7 if dm3e = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 31 30 29 28 27 26 25 24 bit symbol eim3f1 eim3f0 dm3f il3f2 il3f1 il3f0 read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function always reads "0." selects active state of interrupt request. 10: falling edge be sure to set "10." set as dmac activation factor. 0: non- activation factor 1: interrupt number 63 to be the activation factor. always reads "0." if dm3f = 0, select the interrupt level for interrupt number 63 (intdma7). 000: disable interrupt 001 to 111: 1 to 7 if dm3f = 1, select the dmac channel. 000 to 011: 0 to 3 100 to 111: 4 to 7 note: default values of eimxx0 and eimxx1 are different from the values to be used. properly set them to the specified values before use.
tmp19a64c1d tmp19a64(rev1.1) 6-30 note 1: please ensure that the type of active state is selected before enabling an interrupt request. note 2: when making interrupt requests dmac activation factors, please ensure that you put the dmac into standby mode after setting the intc. 6.5.5 interrupt request clear register this register is used to clear in terrupt requests. interrupt requests ar e cleared by setting the ivr value. 7 6 5 4 3 2 1 0 intclr bit symbol eiclr7 eiclr6 eiclr5 eiclr4 eiclr3 eiclr2 eiclr1 eiclr0 (0xffff_e060) read/write r/w after reset 0 0 0 0 0 0 0 0 function set the ivr value that corresponds to the interrupt request that you would like to clear. 15 14 13 12 11 10 9 8 bit symbol eiclr8 read/write r r/w after reset 0 0 function always reads "0." 23 22 21 20 19 18 17 16 bit symbol read/write r after reset 0 function always reads "0." 31 30 29 28 27 26 25 24 bit symbol read/write r after reset 0 function always reads "0." (note 1) do not clear interrupt requests before reading the ivr value. if an interrupt request is cleared, ivr is cleared to "0." (note 2) to make the interrupt controller (intc) disable specified interrupt requests, perform the following steps in the order shown: c disable the processor core to accept interrupts (status = 0). d disable the intc to accept interrupts (imcxx = 000). e execute the sync instruction. f enable the processor core to accept interrupts (status = 1). example) mtc0 r0, r31 ; _di ( ); sb r0, imc** ; imc** = 0 ; sync ; _sync( ); mtc0 $sp, r31 ; _ei ( ); (note 3) any internal dma request initiated by an interrupt factor will not be cleared. when the request is to be canceled, clear the activation factor bit of (imcx) .
tmp19a64c1d tmp19a64(rev1.1) 6-31 6.5.6 intcg registers (interrupts to clear stop, sleep and idle modes) z int0 to intb, kwup0 to kwup7: stop/sleep/idle z intrtc, inttba (two-phase pulse input counter): sleep 7 6 5 4 3 2 1 0 imcga bit symbol emcg01 emcg00 int0en (0xffff_ee10) read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function always reads "0." always reads "0." set active state of int0 standby clear request. 00: "l" level 01: ?h? level 10: falling edge 11: rising edge always reads "0." always reads "0." always reads "0." int0 clear input 0: disable 1: enable 15 14 13 12 11 10 9 8 bit symbol emcg11 emcg10 int1en read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function always reads "0." always reads "0." set active state of int1 standby clear request. 00: "l" level 01: ?h? level 10: falling edge 11: rising edge always reads "0." always reads "0." always reads "0." int1 clear input 0: disable 1: enable 23 22 21 20 19 18 17 16 bit symbol emcg21 emcg20 int2en read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function always reads "0." always reads "0." set active state of int2 standby clear request. 00: "l" level 01: ?h? level 10: falling edge 11: rising edge always reads "0." always reads "0." always reads "0." int2 clear input 0: disable 1: enable 31 30 29 28 27 26 25 24 bit symbol emcg31 emcg30 int3en read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function always reads "0." always reads "0." set active state of int3 standby clear request. 00: "l" level 01: ?h? level 10: falling edge 11: rising edge always reads "0." always reads "0." always reads "0." int3 clear input 0: disable 1: enable
tmp19a64c1d tmp19a64(rev1.1) 6-32 7 6 5 4 3 2 1 0 imcgb bit symbol emcg41 emcg40 int4en (0xffff_ee14) read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function always reads "0." always reads "0." set active state of int4 standby clear request. 00: "l" level 01: "h" level 10: falling edge 11: rising edge always reads "0." always reads "0." always reads "0." int4 clear input 0: disable 1: enable 15 14 13 12 11 10 9 8 bit symbol emcg51 emcg50 int5en read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function always reads "0." always reads "0." set active state of int5 standby clear request. 00: "l" level 01: "h" level 10: falling edge 11: rising edge always reads "0." always reads "0." always reads "0." int5 clear input 0: disable 1: enable 23 22 21 20 19 18 17 16 bit symbol emcg61 emcg60 int6en read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function always reads "0." always reads "0." set active state of int6 standby clear request. 00: "l" level 01: "h" level 10: falling edge 11: rising edge always reads "0." always reads "0." always reads "0." int6 clear input 0: disable 1: enable 31 30 29 28 27 26 25 24 bit symbol emcg71 emcg70 int7en read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function always reads "0." always reads "0." set active state of int7 standby clear request. 00: "l" level 01: "h" level 10: falling edge 11: rising edge always reads "0." always reads "0." always reads "0." int7 clear input 0: disable 1: enable
tmp19a64c1d tmp19a64(rev1.1) 6-33 7 6 5 4 3 2 1 0 imcgc bit symbol emcg81 emcg80 int8en (0xffff_ee18) read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function always reads "0." always reads "0." set active state of int8 standby clear request. 00: "l" level 01: "h" level 10: falling edge 11: rising edge always reads "0." always reads "0." always reads "0." int8 clear input 0: disable 1: enable 15 14 13 12 11 10 9 8 bit symbol emcg91 emcg90 int9en read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function always reads "0." always reads "0." set active state of int9 standby clear request. 00: "l" level 01: "h" level 10: falling edge 11: rising edge always reads "0." always reads "0." always reads "0." int9 clear input 0: disable 1: enable 23 22 21 20 19 18 17 16 bit symbol emcga1 emcga0 intaen read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function always reads "0." always reads "0." set active state of inta standby clear request. 00: "l" level 01: "h" level 10: falling edge 11: rising edge always reads "0." always reads "0." always reads "0." inta clear input 0: disable 1: enable 31 30 29 28 27 26 25 24 bit symbol emcgb1 emcgb0 intben read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function always reads "0." always reads "0." set active state of intb standby clear request. 00: "l" level 01: "h" level 10: falling edge 11: rising edge always reads "0." always reads "0." always reads "0." intb clear input 0: disable 1: enable
tmp19a64c1d tmp19a64(rev1.1) 6-34 7 6 5 4 3 2 1 0 imcgd bit symbol emcgc1 emcgc0 kwupen (0xffff_ee1c) read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function always reads "0." always reads "0." set active state of kwup standby clear request. 01: "h" level be sure to set "01." always reads "0." always reads "0." always reads "0." kwup clear input 0: disable 1: enable 15 14 13 12 11 10 9 8 bit symbol emcgd1 emcgd0 intrtcen read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function always reads "0." always reads "0." set active state of intrtc standby clear request. 11: rising edge be sure to set "11." always reads "0." always reads "0." always reads "0." intrtc clear input 0: disable 1: enable 23 22 21 20 19 18 17 16 bit symbol emcge1 emcge0 inttbaen read/write r r/w r r/w after reset 0 0 1 0 0 0 function always reads "0." always reads "0." set active state of inttba standby clear request. 11: rising edge be sure to set "11." always reads "0." always reads "0." always reads "0." inttba clear input 0: disable 1: enable 31 30 29 28 27 26 25 24 bit symbol read/write r r/w r r/w after reset 0 0 1 0 0 0 function always reads "0." always reads "0." undefined always reads "0." always reads "0." always reads "0." write "1." note: in imcgd, the initial value to request clearing of the standby mode is different from the setting to be made in an operation condition. be sure to set appropriate parameters before it is used to clear the standby mode.
tmp19a64c1d tmp19a64(rev1.1) 6-35 be sure to set active state of the clear request if interrupt is enabled for clearing the stop, sleep, or idle standby mode. (note1) when using interrupts, be sure to follow the following sequence of action: c if shared with other general ports, enable the target interrupt input. d set active state, etc., upon initialization. e clear interrupt requests. f enable interrupts (note 2) settings must be performed while interrupts are disabled. (note 3) for clearing the stop, sleep and idle m odes with tmp19a64, 15 factors, i.e., int0 to intb, intrtc, inttba, and kwup (kwup0 to 7) are available as clearing interrupts. whether or not int0 to intb are to be used as clearing interrupts as well as active state edge/level selection is set with cg. whether or not kwup0 to 7 are to be used as stop/sleep/idle clearing interrupts is set with cg and active state edge/level selection is set with kwupstn . set to high level with intc for the above 15 factors. example: enabling int0 interrupt imcga = "10" cg block imcga = "1" (enable input by the falling edge) imc0 = "01" intc block imc0 = "101" (set interrupt active level to "h" and the interrupt level to 5.) interrupt factors other than those assigned as stop/sleep/idle clear requests are set in the intc block. (note 4) among the above 15 factors to be assigned as stop/sleep/idle clear request interrupts, int0 to intb don't have to be set with cg if they are to be used as normal interrupts. use intc to specify either h/l le vel or rising/falling edge. if kwup0 to 7 are to be used as normal interrupts, set the active level by kwupstn and set high level with intc. no cg setting is necessary. also, if intrtc is to be used as a normal interrupt, use cg/intc for the setting. interrupt factors other than those assigned as stop/sleep/idle clear requests are set in the intc block.
tmp19a64c1d tmp19a64(rev1.1) 6-36 eicrcg 7 6 5 4 3 2 1 0 (0xffff_ee20) bit symbol icrcg3 icrcg2 icrcg1 icrcg0 read/write r w/r after reset 0 0 0 0 0 0 0 0 function always reads "0." always reads "0." clear interrupt requests. 0000: int0 0101: int5 1010: inta 0001: int1 0110: int6 1011: intb 0010: int2 0111: int7 1100: kwup 0011: int3 1000: int8 1101: intrtc 0100: int4 1001: int9 1110: inttba 1111: reserved 15 14 13 12 11 10 9 8 bit symbol read/write r after reset 0 0 0 0 0 0 0 0 function always reads "0." 23 22 21 20 19 18 17 16 bit symbol read/write r after reset 0 0 0 0 0 0 0 0 function always reads "0." 31 30 29 28 27 26 25 24 bit symbol read/write r after reset 0 0 0 0 0 0 0 0 function always reads "0." (note 5) to clear interrupt request of the above 15 factors that are assigned to clear stop/sleep/idle modes, c for kwup, use kwupst d for int0 to intb, inttba and intrtc use the eicrcg register in the above cg block and then use the intclr register in the intc block (two locations). e for clearing any other interrupt requests, only intclr register is to be cleared.
tmp19a64c1d tmp19a64(rev1.1) 6-37 nmiflg 7 6 5 4 3 2 1 0 (0xffff_ee24) bit symbol nmi wdt wber read/write r after reset 0 0 0 0 0 0 0 0 function always reads "0." nmi factor 1: nmi generated by nmi pin input nmi factor 1: nmi generated by wdt interrupt nmi factor 1: nmi generated by write bus error 15 14 13 12 11 10 9 8 bit symbol read/write r after reset 0 0 0 0 0 0 0 0 function always reads "0." 23 22 21 20 19 18 17 16 bit symbol read/write r after reset 0 0 0 0 0 0 0 0 function always reads "0." 31 30 29 28 27 26 25 24 bit symbol read/write r after reset 0 0 0 0 0 0 0 0 function always reads "0." ? nmi, wdt and wber are cleared to "0" when they are read.
tmp19a64c1d tmp19a64 (rev1.1) 7-1 7. input/output ports 7.1 port 0 (p00 through p07) the port 0 is a general-purpose, 8-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register p0cr. a reset allows all bits of p0cr to be cleared to "0" and the port 0 to be put in input mode. besides the general-purpose input/output function, the port 0 performs other functions: d0 through d7 function as a data bus and ad0 through ad7 function as an address data bus. when external memory is accessed, the port 0 automatically functions as either a data bus or an address data bus, and all bits of p0cr are cleared to "0." if the busmd pin is set to "l" level during a reset, the port 0 is put in separate bus mode (d0 to d7). if it is set to "h" level during a reset, the port 0 is put in multiplexed mode (ad0 to ad7). during external access external read when output externally 0 y direction control (in units of bits) ? p0cr output latch p0 p0 read port 0 p00 through p07 (d0 through d7) (ad0 through ad7) output buffer syscr2 selector selector d0-d7/ ad0-ad7 stop mode 1 selector 1 0 s 1 0 ebif internal data bus reset fig. 7.1.1 port 0 (p00 through p07)
tmp19a64c1d tmp19a64 (rev1.1) 7-2 port 0 register 7 6 5 4 3 2 1 0 p0 bit symbol p07 p06 p05 p04 p03 p02 p01 p00 (0xffff_f000) read/write r/w after reset input mode (output latch register is cleared to "0.") port 0 control register 7 6 5 4 3 2 1 0 p0cr bit symbol p07c p06c p05c p04c p03c p02c p01c p00c (0xffff_f002) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output (when an external area is accessed, d7-0 or ad7- 0 is used and this register is cleared to "0.") fig. 7.1.2 port 0 registers
tmp19a64c1d tmp19a64 (rev1.1) 7-3 7.2 port 1 (p10 through p17) the port 1 is a general-purpose, 8-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register p1cr and the function register p1fc. a reset allows all bits of the output latch p1, p1cr and p1fc to be cleared to "0" and the port 1 to be put in input mode. besides the general-purpose input/output function, the po rt 1 performs other functions: d8 through d15 function as a data bus, ad8 through ad15 function as an addre ss data bus, and a8 through a15 function as an address bus. to access external memory, the port 1 must be designa ted as an address bus or address data bus by making proper p1cr and p1fc settings. if the busmd pin is set to "l" level during a reset, the port 1 is put in separate bus mode (d8 to d15). if it is set to "h" level during a reset, the port 1 is put in multiplexed mode (ad8 to ad15 or a8 to a15). external read when output external direction control (in units of bits) p1cr output latch p1 p1 read port 1 p10 through p17 (d8 through d15) (ad8 through ad15/a8 through a15) selector s y 1 0 selector a d8 through d15/ a 8 through a15 1 0 selector 1 0 ebif function control (in units of bits) p1fc internal data bus syscr2 stop mode reset fig. 7.2.1 port 1 (p10 through p17)
tmp19a64c1d tmp19a64 (rev1.1) 7-4 port 1 register 7 6 5 4 3 2 1 0 p1 bit symbol p17 p16 p15 p14 p13 p12 p11 p10 (0xffff_f001) read/write r/w after reset input mode (output latch register is cleared to "0.") port 1 control register 7 6 5 4 3 2 1 0 p1cr bit symbol p17c p16c p15c p14c p13c p12c p11c p10c (0xffff_f004) read/write r/w after reset 0 0 0 0 0 0 0 0 function << see p1fc >> port 1 function register 7 6 5 4 3 2 1 0 p1fc bit symbol p17f p16f p15f p14f p13f p12f p11f p10f (0xffff_f005) read/write r/w after reset 0 0 0 0 0 0 0 0 function p1fc/p1cr = 00: input, 01: output, 10: d15 through 8 or ad15 through 8, 11: a15 through 8 function corresponding bit of p1fc corresponding bit of p1cr port to be used por1 input setting 0 0 port1 por1 output setting 0 1 port1 data bus (d15 through d8) input/output setting 1 0 separate bus mode (busmd="0") address bus (a15 through a8) output setting 1 1 port1 address data bus (ad15 through ad8) input/output setting 1 0 multiplexed bus mode (busmd="1") address bus (a15 through a8) output setting 1 1 port1 fig. 7.2.2 port 1 registers
tmp19a64c1d tmp19a64 (rev1.1) 7-5 7.3 port 2 (p20 through p27) the port 2 is a general-purpose, 8-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register p2cr and the function register p2fc. a reset allows all bits of the output latch p2 to be set to "1," all bits of p2cr and p2fc to be cleared to "0," and the port 2 to be put in input mode. besides the general-purpose input/output port function, the port 2 performs another function: a0 through a7 function as one address bus and a16 through a23 function as the other address bus. to access external memory, registers p2cr and p2fc must be provisioned to allow the port 2 to function as an address bus. if the busmd pin is set to "l" level during a reset, the port 2 is put in separate mode (a16 to a23). if it is set to "h" level during a reset, the port 2 is put in multiplexed mode (a0 through a7 or a16 through a23). during external access p2fc function control (in units of bits) ? direction control (in units of bits) p2cr output latch p2 p2 read port 2 p20 through p27 (a16 through a23) (a0 through a7/a16 through a23) reset y 0 1 selector selector a 16 through a23/ selector 1 0 a 0 through a7 s 1 0 internal data bus syscr2 stop mode fig. 7.3.1 port 2 (p20 through p27)
tmp19a64c1d tmp19a64 (rev1.1) 7-6 port 2 register 7 6 5 4 3 2 1 0 p2 bit symbol p27 p26 p25 p24 p23 p22 p21 p20 (0xffff_f012) read/write r/w after reset input mode (output latch register is cleared to "1.") port 2 control register 7 6 5 4 3 2 1 0 p2cr bit symbol p27c p26c p25c p24c p23c p22c p21c p20c (0xffff_f014) read/write r/w after reset 0 0 0 0 0 0 0 0 function <> port 2 function register 7 6 5 4 3 2 1 0 p2fc bit symbol p27f p26f p25f p24f p23f p22f p21f p20f (0xffff_f015) read/write r/w after reset 0 0 0 0 0 0 0 0 function p2fc/p2cr = 00: input, 01: output, 10: a7 through 0, 11: a23 through 16 function corresponding bit of p2fc corresponding bit of p2cr port to be used por2 input setting 0 0 port2 por2 output setting 0 1 port2 address bus (a7 through a0) output setting (*1) 1 0 port2 address bus (a23 through a16) output setting (*1) 1 1 port2 (*1) the same address bus (a7 through a0/a23 through a16) output settings are used in both the separate bus mode and the multip lexed bus mode (busmd="0," "1"). fig. 7.3.2 port 2 registers
tmp19a64c1d tmp19a64 (rev1.1) 7-7 7.4 port 3 (p30 through p37) the port 3 is a general-purpose, 8-bit input/output port (p30 and p31 are used exclusively for output). for this port, inputs and outputs can be specified in units of bits by using the control register p3cr and the function register p3fc. a reset allows the output latches p30 and 31 to be set to "1." if the busmd pin is at the "l" level when a reset is performed, p37 goes into separate bus mode, and the output latch is set to "1." if the busmd pin is at the "h" level when a reset is performed, p37 goes into multiplexed bus mode, and the output latch is cleared to "0." bit 2 through bit 6 of p3cr (bits 0 and 1 are unused) are cleared to "0." bit 7 of p3cr is cleared to "0" in separate bus mode and set to "1" in multiplexed bus mode. all bits of p3fc are cleared to "0," p30 and p31 generate "h," and p32 through p36 go into the input mode with a pull-up resistor after reset is cleared. if the port 3 goes into separate bus mode, p37 is put into input mode. if the port 3 goes into multiplexed bus mode, p37 is put into output mode. besides the general-purpose input/output port function, the port 3 inputs and outputs cpu control/status signals. if the p30 pin is set to rd signal output mode ( = "1"), the rd strobe is output only when an external address area is accessed. likewise, if the p31 pin is set to wr signal output mode ( = "1"), the wr strobe is output only when an ex ternal address area is accessed. as for p32 and p36, when = "1," and busak = "0," pull-up is enabled. rd , wr function control (in units of bits) p3fc p30 ( rd ) p31 ( wr ) p3 write during external access internal data bus selector s selector 1 0 s 0 1 p3 output latch syscr2 stop mode p3 read fig. 7.4.1 port 3 (p30, p31)
tmp19a64c1d tmp19a64 (rev1.1) 7-8 function control (in units of bits) p3fc direction control (in units of bits) p3cr internal data bus selector s 0 1 output latch p3 selector 1 0 hwr selector 0 1 during external access stop mode syscr2 programmable pull-up p32 ( hwr ) p3 read fig. 7.4.2 port 3 (p32)
tmp19a64c1d tmp19a64 (rev1.1) 7-9 fig. 7.4.3 port 3 (p33) output buffer direction control (in units of bits) p3cr stop mode syscr2 internal data bus output latch p3 function control (in units of bits) p3fc programmable pull-up p3 read selector 1 0 p33 (wait / rdy) selector 1 0 wait rdy reset
tmp19a64c1d tmp19a64 (rev1.1) 7-10 direction control (in units of bits) p3cr stop mode syscr2 reset output latch p3 function control (in units of bits) p3fc programmable pull-up selector s y 1 0 p34 (busrq) busrq internal data bus p3 read fig. 7.4.4 port 3 (p34)
tmp19a64c1d tmp19a64 (rev1.1) 7-11 direction control (in units of bits) p3cr output latch p3 function control (in units of bits) p3fc selector 1 0 busak selector 1 0 selector 1 0 internal data bus stop mode syscr2 programmable pull-up p35 (busak) p3 read fig. 7.4.5 port 3 (p35)
tmp19a64c1d tmp19a64 (rev1.1) 7-12 during external access fig. 7.4.6 port 3 (p36) direction control (in units of bits) p3cr internal data bus stop mode syscr2 output latch p3 function control (in units of bits) p3fc programmable pull-up p3 read selector 0 1 p36 (r/w) r/w selector 1 0 selector 1 0
tmp19a64c1d tmp19a64 (rev1.1) 7-13 stop mode syscr2 fig. 7.4.7 port 3 (p37) direction control (in units of bits) p3cr internal data bus output latch p3 function control (in units of bits) p3fc p3 read selector 1 0 p37 (ale) ale selector 1 0 selector 1 0 reset
tmp19a64c1d tmp19a64 (rev1.1) 7-14 port 3 register 7 6 5 4 3 2 1 0 p3 bit symbol p37 p36 p35 p34 p33 p32 p31 p30 (0xffff_f018) read/write r/w output mode after reset to be determined according to the bus mode (*1) 1 1 1 1 1 1 1 port 3 control register 7 6 5 4 3 2 1 0 p3cr bit symbol p37c p36c p35c p34c p33c p32c ? ? (0xffff_f01a) read/write r/w r after reset 0 0 0 0 0 0 0 function to be determined according to the bus mode (*1) 0: input 1: output output port 3 function register 7 6 5 4 3 2 1 0 p3fc bit symbol p37f p36f p35f p34f p33f p32f p31f p30f (0xffff_f01b) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: port 0: port 0: port 0: port 0: port/ wait 0: port 0: port 0: port 1: ale 1: r/w 1: busak 1: busrq 1: port/ rdy 1: hwr 1: wr 1: rd function corresponding bit of p3fc corresponding bit of p3cr port to be used rd output setting 1(*2) ? p30 wr output setting 1(*2) ? p31 hwr output setting 1 1 p32 wait input setting rdy input setting 0 1 0 0 p33 busrq input setting 1 0 p34 busak output setting 1 1 p35 r/w output setting 1 1 p36 ale output setting (busmd = "1") 1(*1) 1 p37 (*1) in separate bus mode (busmd="0"), ale is not output. the port 3 functions as an input/output port based on the bit setting of the control register p3cr. after a reset, the port becomes an input port. if a reset is executed in multiplexed bus mode (busmd="1"), the port 3 becomes an output port at "l" level. (*2) /rd and /wr are output only when an external area is being accessed. fig. 7.4.6 port 3 registers
tmp19a64c1d tmp19a64 (rev1.1) 7-15 7.5 port 4 (p40 through p47) the port 4 is a general-purpose, 8-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register p4cr and the function register p4fc. a reset allows all bits of the output latch p4 to be set to "1" and all bits of p4cr to be reset to "0." bits of p40fc through p46fc are reset to "0." p40 through p45 goes into the input mode with a pull-up resistor, and p46 and p47 are put into input mode. besides the general-purpose input/output port function, the ports 40 through 45 outputs chip select signals ( cs0 through cs5 ), and the port 46 functions as a scout output pin for outputting external clocks. during external access fig. 7.5.1 port 4 (p40 to p45) cs0, cs1 cs2, cs3 cs4, cs5 p40 (cs0) p41 (cs1) p42 (cs2) p43 (cs3) p44 (cs4) p45 (cs5) direction control (in units of bits) p4cr internal data bus output latch p4 function control (in units of bits) p4fc programmable pull-up p4 read selector 1 0 selector 1 0 selector 1 0 stop mode syscr2 reset
tmp19a64c1d tmp19a64 (rev1.1) 7-16 0 1 p46 (scout) reset stop mode syscr2 internal data bus fs clock f sys clock f sys /2 clock t0 clock p4 read selector p4 output latch selector 1 0 p4cr direction control (in units of bits) function control (in units of bits) p4fc fig. 7.5.2 port 4 (p46)
tmp19a64c1d tmp19a64 (rev1.1) 7-17 direction control (in units of bits) p4cr p4 read p47 selector 1 0 output latch p4 reset internal data bus stop mode syscr2 fig. 7.5.3 port 4 (p47)
tmp19a64c1d tmp19a64 (rev1.1) 7-18 port 4 register 7 6 5 4 3 2 1 0 p4 bit symbol p47 p46 p45 p44 p43 p42 p41 p40 (0xffff_f01e) read/write r/w after reset input mode 1 1 1 (pull-up) 1 (pull-up) 1 (pull-up) 1 (pull-up) 1 (pull-up) 1 (pull-up) port 4 control register 7 6 5 4 3 2 1 0 p4cr bit symbol p47c p46c p45c p44c p43c p42c p41c p40c (0xffff_f020) read/write r/w after reset 0 0 0 0 0 0 0 0 0: input 1: output port 4 function register 7 6 5 4 3 2 1 0 p4fc bit symbol p47f p46f p45f p44f p43f p42f p41f p40f (0xffff_f021) read/write r r/w after reset 0 0 0 0 0 0 0 0 function 0: port 0: port 1: scout 0: port 1: cs5 0: port 1: cs4 0: port 1: cs3 0: port 1: cs2 0: port 1: cs1 0: port 1: cs0 function corresponding bit of p4fc corresponding bit of p4cr port to be used cs0 output setting 1 1 p40 cs1 output setting 1 1 p41 cs2 output setting 1 1 p42 cs3 output setting 1 1 p43 cs4 output setting 1 1 p44 cs5 output setting 1 1 p45 scout output setting 1 1 p46 fig. 7.5.4 port 4 registers
tmp19a64c1d tmp19a64 (rev1.1) 7-19 7.6 port 5 (p50 through p57) the port 5 is a general-purpose, 8-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register p5cr and the function register p5fc. a reset allows all bits of the output latch p5 to be set to "1," all bits of p5cr and p5fc to be cleared to "0," and the port 5 to be put in input mode. the port 5 also functions as an address bus (a0 thro ugh a7). to access external memory, p5cr and p5fc must be provisioned to allow the port 5 to function as an address bus. this address bus function can be used only in separate bus mode. (to put the port 5 in separate bus mode, the busmd pin must be set to "l" level during a reset.) direction control (in units of bits) p5cr port 5 (p50 to p57/a0 through a7) a0 through a7 internal data bus selector 1 0 output latch p5 function control (in units of bits) p5fc selector p5 read 1 0 stop mode syscr2 reset selector 0 1 during external access fig. 7.6.1 port 5 (p50 to p57)
tmp19a64c1d tmp19a64 (rev1.1) 7-20 port 5 register 7 6 5 4 3 2 1 0 p5 bit symbol p57 p56 p55 p54 p53 p52 p51 p50 (0xffff_f028) read/write r/w after reset input mode (output latch register is set to "1.") port 5 control register 7 6 5 4 3 2 1 0 p5cr bit symbol p57c p56c p55c p54c p53c p52c p51c p50c (0xffff_f02c) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port 5 function register 7 6 5 4 3 2 1 0 p5fc bit symbol p57f p56f p55f p54f p53f p52f p51f p50f (0xffff_f02d) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: port 1: a7 0: port 1: a6 0: port 1: a5 0: port 1: a4 0: port 1: a3 0: port 1: a2 0: port 1: a1 0: port 1: a0 function corresponding bit of p5fc corresponding bit of p5cr port to be used por5 input setting 0 0 port5 por5 output setting 0 1 port5 address bus (a7 to a0) output setting (*1) 1 1 port5 (*1) the same address bus (a7 through a0) output setting is used in both the separate bus mode and multiplexed bus mode (busmd="0," "1"). fig. 7.6.2 port 5 registers
tmp19a64c1d tmp19a64 (rev1.1) 7-21 7.7 port 6 (p60 through p67) the port 6 is a general-purpose, 8-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register p6cr and the function register p6fc. a reset allows all bits of the output latch p6 to be set to "1," all bits of p6cr and p6fc to be cleared to "0," and the port 6 to be put in input mode. besides the input/output port function, the port 6 performs other functions: p60 and p63 output sio data, p61 and p64 input sio data, p62 and p65 input and output sio clk or input cts, p61 and p64 input external interrupts, and p66 and p67 output a 16-bit timer. the port 6 also functions as an address bus (a8 thr ough a15). to access external memory, p6cr and p6fc must be provisioned to allow the port 6 to function as an address bus. the address bus function can be used only in separate bus mode. (to put the port 6 in separate bus mode, the busmd pin must be set to "l" level during a reset.) direction control (in units of bits) p6cr port 6 (p60 to p67/a8 through a15 ) a 8 through a15 selector 1 0 output latch p6 function control (in units of bits) p6fc selector 1 selector 0 1 internal data bus during external access stop mode syscr2 reset p6 read fig. 7.7.1 port 6 (p60 through p67)
tmp19a64c1d tmp19a64 (rev1.1) 7-22 port 6 register 7 6 5 4 3 2 1 0 p6 bit symbol p67 p66 p65 p64 p63 p62 p61 p60 (0xffff_f029) read/write r/w after reset input mode (output latch register is set to "1.") port 6 control register 7 6 5 4 3 2 1 0 p6cr bit symbol p67c p66c p65c p64c p63c p62c p61c p60c (0xffff_f02e) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port 6 function register 7 6 5 4 3 2 1 0 p6fc bit symbol p67f p66f p65f p64f p63f p62f p61f p60f (0xffff_f02f) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: port 1: a15 0: port 1: a14 0: port 1: a13 0: port 1: a12 0: port 1: a11 0: port 1: a10 0: port 1: a9 0: port 1: a8 function corresponding bit of p6f corresponding bit of p6cr port to be used por6 input setting 0 0 port6 por6 output setting 0 1 port6 address bus (a15 to a8) output setting (*1) 1 1 port6 (*1) the same address bus (a15 through a8) output setting is used in both the separate bus mode and multiplexed bus mode (busmd="0," "1"). fig. 7.7.2 port 6 registers
tmp19a64c1d tmp19a64 (rev1.1) 7-23 7.8 port 7 (p70 through p77), port 8 (p 80 through p87) and port 9 (p90 through p97) the ports 7, 8 and 9 are 8-bit ports and used exclusively for input. they are also used as analog input ports for the a/d converter. inputs can be specified by using the func tion register pnfc. a reset allows all bits of pnfc to be cleared to "0" and the ports 7, 8 and 9 to be put in input mode. fig. 7.8.1 port 7 to 9 (p70 through p 77, p80 through p87 and p90 through p97) ad read port 7 (p7 through p9) read port 7 to 9 p70 through p97 (an0 through an23) internal data bus a/d converter reset function control (p7fc, p8fc, p9fc) (in units of bits) reset
tmp19a64c1d tmp19a64 (rev1.1) 7-24 port 7 register 7 6 5 4 3 2 1 0 p7 bit symbol p77 p76 p75 p74 p73 p72 p71 p70 (0xffff_f040) read/write r after reset input mode port 7 function register 7 6 5 4 3 2 1 0 p7fc bit symbol p77f p76f p75f p74f p73f p72f p71f p70f (0xffff_f048) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: port 1: an7 0: port 1: an6 0: port 1: an5 0: port 1: an4 0: port 1: an3 0: port 1: an2 0: port 1: an1 0: port 1: an0 port 8 register 7 6 5 4 3 2 1 0 p8 bit symbol p87 p86 p85 p84 p83 p82 p81 p80 (0xffff_f041) read/write r after reset input mode port 8 function register 7 6 5 4 3 2 1 0 p8fc bit symbol p87f p86f p85f p84f p83f p82f p81f p80f (0xffff_f049) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: port 1: an15 0: port 1: an14 0: port 1: an13 0: port 1: an12 0: port 1: an11 0: port 1: an10 0: port 1: an9 0: port 1: an8 port 9 register 7 6 5 4 3 2 1 0 p9 bit symbol p97 p96 p95 p94 p93 p92 p91 p90 (0xffff_f042) read/write r after reset input mode port 9 function register 7 6 5 4 3 2 1 0 p9fc bit symbol p97f p96f p95f p94f p93f p92f p91f p90f (0xffff_f04a) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: port 1: an23 0: port 1: an22 0: port 1: an21 0: port 1: an20 0: port 1: an19 0: port 1: an18 0: port 1: an17 0: port 1: an16 function corresponding bits of p7fc, p8fc and p9fc input setting for the ports 7, 8 and 9 0 input setting for an23 through an0 1 fig. 7.8.2 registers of the ports 7, 8 and 9
tmp19a64c1d tmp19a64 (rev1.1) 7-25 7.9 port a (pa0 through pa7) the port a is a general-purpose, 8-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register pacr. a reset allows pacr to be reset to "0" and the port a to function as an input port. besides the input/output port function, the port a performs other functions: pa2, pa5, pa6 and pa7 output a 16-bit timer, and pa0, pa1, pa3 and pa4 input a 16-bit timer and external interrupts. these functions are enabled by setting corresponding bits of pafc to "1." a reset allows pacr and pafc to be cleared to "0" and the port a to be put in input mode. fig. 7.9.1 port a (pa0, pa1, pa3, pa4) function control (pafc) (in units of bits) direction control (pacr) (in units of bits) output latch (pa) stop mode syscr2 internal data bus 1 selector 0 pa read pa0 (tb0in0) / int5 pa1 (tb0in1) / int6 pa3 (tb1in0) / int7 pa4 (tb1in1) / int8 s pa0 (tb0in0) / int5 , pa1 (tb0in1) / int6 , pa3 (tb1in0) / int7 , pa4 (tb1in1) / int8 reset
tmp19a64c1d tmp19a64 (rev1.1) 7-26 fig. 7.9.2 port a (pa2, pa5, pa6, pa7) function control (pafc) (in units of bits) direction control (pacr) (in units of bits) output latch (pa) stop mode syscr2 reset internal data bus s 0 selector 1 s 1 selector 0 timer f/f out pa read pa2 (tb0out pa5 (tb1out) pa6 (tb2out) pa7 (tb3out) tb0out, tb1out tb2out, tb3out
tmp19a64c1d tmp19a64 (rev1.1) 7-27 port a register 7 6 5 4 3 2 1 0 pa bit symbol pa7 pa6 pa5 pa4 pa3 pa2 pa1 pa0 (0xffff_f043) read/write r/w after reset input mode (output latch register is set to "1.") port a control register 7 6 5 4 3 2 1 0 pacr bit symbol pa7c pa6c pa5c pa4c pa3c pa2c pa1c pa0c (0xffff_f047) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port a function register 7 6 5 4 3 2 1 0 pafc bit symbol pa7f pa6f pa5f pa4f pa3f pa2f pa1f pa0f (0xffff_f04b) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: port 1: tb3out 0: port 1: tb2out 0: port 1: tb1out 0: port 1: tb1in1 / int8 0: port 1: tb1in0 / int7 0: port 1: tb0out 0: port 1: tb0in1 / int6 0: port 1: tb0in0 / int5 function corresponding bit of pafc corresponding bit of pacr port to be used tb0in0 input setting 1 0 int5 input setting 1(*1) 0 pa0 tb0in1 input setting 1 0 int6 input setting 1(*1) 0 pa1 tb0out output setting 1 1 pa2 tb1in0 input setting 1 0 int7 input setting 1(*1) 0 pa3 tb1in1 input setting 1 0 int8 input setting 1(*1) 0 pa4 tb1out output setting 1 1 pa5 tb2out output setting 1 1 pa6 tb3out output setting 1 1 pa7 (*1) this bit setting is used only if an interrupt must be generated to clear the stop status and if syscr is set to 0. in all other cases , this bit setting does not need to be used. (note) if two input functions in addition to the port function are assigned to one pin, which input function to be used shall be designated by making proper enable/disable settings provided in each function block. fig. 7.9.3 port a registers
tmp19a64c1d tmp19a64 (rev1.1) 7-28 7.10 port b (pb0 through pb7) port b is a general-purpose, 8-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register pbcr. a reset allows p bcr to be reset to "0" and the port b to function as an input port. besides the input/output port function, the port b performs other functions: pb0 through pb5 output a 16-bit timer, and pb6 and pb7 input a 16-bit timer. these functions are enabled by setting corresponding bits of pbfc to "1." a rest allows pbcr and pbfc to be clea red to "0" and the port b to function as an input port. fig. 7.10.1 port b (pb0 through pb5) function control (pbfc) (in units of bits) direction control (pbcr) (in units of bits) output latch (pb) stop mode syscr2 reset internal data bus s 0 selector 1 s 1 selector 0 timer f/f out pb read pb0 (tb4out) pb1 (tb5out) pb2 (tb6out) pb3 (tb7out) pb4 (tb8out) pb5 (tb9out) tb4out, tb5out tb6out, tb7out tb8out, tb9out
tmp19a64c1d tmp19a64 (rev1.1) 7-29 fig. 7.10.2 port b (pb6, pb7) function control (pbfc) (in units of bits) direction control (pbcr) (in units of bits) output latch (pb) stop mode syscr2 reset internal data bus 1 selector 0 pb read pb6 (tbain0) pb7 (tbain1) s tbain0, tbain1
tmp19a64c1d tmp19a64 (rev1.1) 7-30 port b register 7 6 5 4 3 2 1 0 pb bit symbol pb7 pb6 pb5 pb4 pb3 pb2 pb1 pb0 (0xffff_f050) read/write r/w after reset input mode (output latch register is set to "1.") port b control register 7 6 5 4 3 2 1 0 pbcr bit symbol pb7c pb6c pb5c pb4c pb3c pb2c pb1c pb0c (0xffff_f054) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port b function register 7 6 5 4 3 2 1 0 pbfc bit symbol pb7f pb6f pb5f pb4f pb3f pb2f pb1f pb0f (0xffff_f058) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: port 1: tbain1 0: port 1: tbain0 0: port 1: tb9out 0: port 1: tb8out 0: port 1: tb7out 0: port 1: tb6out 0: port 1: tb5out 0: port 1: tb4out function corresponding bit of pbfc corresponding bit of pbcr port to be used tb4out output setting 1 1 pb0 tb5out output setting 1 1 pb1 tb6out output setting 1 1 pb2 tb7out output setting 1 1 pb3 tb8out output setting 1 1 pb4 tb9out output setting 1 1 pb5 tbain0 input setting 1 0 pb6 tbain1 input setting 1 0 pb7 fig. 7.10.3 port b registers
tmp19a64c1d tmp19a64 (rev1.1) 7-31 7.11 port c (pc0 to pc7) port c is a general-purpose, 8-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register pccr. a reset allows p ccr to be reset to "0" and the port c to function as an input port. besides the input/output port function, the port c performs other functions: pc0, pc3 and pc6 output sio data, pc1, pc4 and pc7 input sio data, and pc2 and pc5 input and output sio clk or input cts. these functions are enabled by setting corresponding bits of pcfc to "1." a reset allows pccr and pcfc to be cleared to "0" and the port c to function as an input port. fig. 7.11.1 port c (pc0, pc3, pc6) function control (pcfc) (in units of bits) direction control (pccr) (in units of bits) output latch (pc) stop mode syscr2 txd0 output txd1 output txd2 output reset internal data bus pc read pc0 (txd0) pc3 (txd1) pc6 (txd2) open drain setting possible pcode pcode pcode 0 selector 1 s 1 selector 0 s
tmp19a64c1d tmp19a64 (rev1.1) 7-32 fig. 7.11.2 port c (pc1, pc4, pc7) function control (pcfc) (in units of bits) direction control (pccr) (in units of bits) output latch (pc) stop mode syscr2 reset internal data bus 1 selector 0 pc read pc1 (rxd0) pc4 (rxd1) pc7 ( rxd2 ) s rxd0 input rxd1 input rxd2 input
tmp19a64c1d tmp19a64 (rev1.1) 7-33 fig. 7.11.3 port c (pc2, pc5) function control (pcfc) (in units of bits) direction control (pccr) (in units of bits) output latch (pc) stop mode syscr2 sclk0 output sclk1 output reset internal data bus pc read pc2 (sclk0/cts0) pc5 (sclk1/cts1) cts0, cts1 sclk0, sclk1 open drain setting possible pcode pcode 0 selector 1 s 1 selector 0 s
tmp19a64c1d tmp19a64 (rev1.1) 7-34 port c register 7 6 5 4 3 2 1 0 pc bit symbol pc7 pc6 pc5 pc4 pc3 pc2 pc1 pc0 (0xffff_f051) read/write r/w after reset input mode (output latch register is set to "1.") port c control register 7 6 5 4 3 2 1 0 pccr bit symbol pc7c pc6c pc5c pc4c pc3c pc2c pc1c pc0c (0xffff_f055) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port c function register 7 6 5 4 3 2 1 0 pcfc bit symbol pc7f pc6f pc5f pc4f pc3f pc2f pc1f pc0f (0xffff_f059) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: port 1: rxd2 0: port 1: txd2 0: port 1: sclk1 / cts1 0: port 1: rxd1 0: port 1: txd1 0: port 1: sclk0 / cts0 0: port 1: rxd0 0: port 1: txd0 port c open drain control register 7 6 5 4 3 2 1 0 pcode bit symbol pc6ode pc5ode pc3ode pc2ode pc0ode (0xffff_f05d) read/write r r/w r r/w r r/w after reset 0 0 0 0 0 0 0 0 function 0: cmos 0: cmos 1: open drain 0: cmos 1: open drain 0: cmos 0: cmos 1: open drain 0: cmos 1: open drain 0: cmos 0: cmos 1: open drain function corresponding bit of pcfc corresponding bit of pccr port to be used txd0 output setting 1 1 pc0 rxd0 input setting 1 0 pc1 sclk0 output setting sclk0 input setting cts0 input setting 1 1 1 1 0 0 pc2 txd1 output setting 1 1 pc3 rxd1 output setting 1 1 pc4 sclk1 output setting sclk1 input setting cts1 input setting 1 1 1 1 0 0 pc5 txd2 output setting 1 0 pc6 rxd2 input setting 1 0 pc7 fig. 7.11.4 port c registers
tmp19a64c1d tmp19a64 (rev1.1) 7-35 7.12 port d (pd0 to pd7) the port d is a general-purpose, 8-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register pdcr. a rese t allows pdcr to be reset to "0" and the port d to function as an input port. besides the input/output port function, the port d performs other functions: pd0, pd3 and pd6 input and output sio clk or input cts, pd1 and pd4 output sio data, pd2 and pd5 input sio data, and pd7 inputs external interrupts. these functions are enabled by setting corresponding bits of pdfc to "1." a reset allows pdcr and pdfc to be cleared to "0" and the port d to function as an input port. fig. 7.12.1 port d (pd0, pd3, pd6) sclk2 output sclk3 output sclk4 output open drain setting possible pdode pdode pdode pd0 (sclk2/cts2) pd3 (sclk3/cts3) pd6 (sclk4/cts4) function control (pdfc) (in units of bits) direction control (pdcr) (in units of bits) output latch (pd) stop mode syscr2 reset internal data bus pd read 0 selector 1 s 1 selector 0 s cts2, cts3 cts4 sclk2, sclk3 sclk4
tmp19a64c1d tmp19a64 (rev1.1) 7-36 fig. 7.12.2 port d (pd1, pd4) txd3 output txd4 output pd1 (txd3) pd4 (txd4) open drain setting possible pdode pdode function control (pdfc) (in units of bits) direction control (pdcr) (in units of bits) output latch (pd) stop mode syscr2 reset internal data bus pd read 0 selector 1 s 1 selector 0 s
tmp19a64c1d tmp19a64 (rev1.1) 7-37 fig. 7.12.3 port d (pd2, pd5) pd2 (rxd3) pd5 (rxd4) rxd3 input rxd4 input function control (pdfc) (in units of bits) direction control (pdcr) (in units of bits) output latch (pd) stop mode syscr2 reset internal data bus 1 selector 0 pd read s
tmp19a64c1d tmp19a64 (rev1.1) 7-38 fig. 7.12.4 port d (pd7) int9 function control (pdfc) (in units of bits) direction control (pdcr) (in units of bits) output latch (pd) stop mode syscr2 internal data bus 1 selector 0 pd read pd7 (int9) s reset
tmp19a64c1d tmp19a64 (rev1.1) 7-39 port d register 7 6 5 4 3 2 1 0 pd bit symbol pd7 pd6 pd5 pd4 pd3 pd2 pd1 pd0 (0xffff_f052) read/write r/w after reset input mode (output latch register is set to "1.") port d control register 7 6 5 4 3 2 1 0 pdcr bit symbol pd7c pd6c pd5c pd4c pd3c pd2c pd1c pd0c (0xffff_f056) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port d function register 7 6 5 4 3 2 1 0 pdfc bit symbol pd7f pd6f pd5f pd4f pd3f pd2f pd1f pd0f (0xffff_f05a) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: port 1: int9 0: port 1: sclk4 / cts4 0: port 1: rxd4 0: port 1: txd4 0: port 1: sclk3 / cts3 0: port 1: rxd3 0: port 1: txd3 0: port 1: sclk2 / cts2 port d open drain control register 7 6 5 4 3 2 1 0 pdode bit symbol pd6ode pd4ode pd3ode pd1ode pd0ode (0xffff_f05e) read/write r r/w r r/w r r/w after reset 0 0 0 0 0 0 0 0 function 0: cmos 0: cmos 1: open drain 0: cmos 0: cmos 1: open drain 0: cmos 1: open drain 0: cmos 0: cmos 1: open drain 0: cmos 1: open drain function corresponding bit of pdfc corresponding bit of pdcr port to be used sclk2 output setting sclk2 input setting cts2 input setting 1 1 1 1 0 0 pd0 txd3 output setting 1 1 pd1 rxd3 input setting 1 0 pc2 sclk3 output setting sclk3 input setting cts3 input setting 1 1 1 1 0 0 pd3 txd4 output setting 1 1 pd4 rxd4 output setting 1 1 pd5 sclk4 output setting sclk4 input setting cts4 input setting 1 1 1 1 0 0 pd6 int9 input setting 1(*1) 0 pd7 (*1) this bit setting is used only if an interrupt must be generated to clear the stop status and if syscr is set to 0. in all other cases , this bit setting does not need to be used. fig. 7.12.5 port d registers
tmp19a64c1d tmp19a64 (rev1.1) 7-40 7.13 port e (pe0 through pe7) the port e is a general-purpose, 8-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register pecr. a reset allows pecr to be reset to "0" and the port e to function as an input port. besides the input/output port function, th e port e performs other functions: pe0 outputs sio data, pe1 inputs sio data, pe2 inputs and outputs sio clk or inputs cts, and pe6 and pe7 input external interrupts. these functions are enable d by setting corresponding bits of pe fc to "1." a reset allows pecr and pefc to be cleared to "0" and the port e to function as an input port. fig. 7.13.1 port e (pe0) txd5 output pe0 (txd5) open drain setting possible peode function control (pefc) (in units of bits) direction control (pecr) (in units of bits) output latch (pe) stop mode syscr2 reset internal data bus pe read 0 selector 1 s 1 selector 0 s
tmp19a64c1d tmp19a64 (rev1.1) 7-41 fig. 7.13.2 port e (pe1) pe1 (rxd5) rxd5 input function control (pefc) (in units of bits) direction control (pecr) (in units of bits) output latch (pe) stop mode syscr2 reset internal data bus 1 selector 0 pe read s
tmp19a64c1d tmp19a64 (rev1.1) 7-42 fig. 7.13.3 port e (pe2) sclk5 output open drain setting possible peode pe2 (sclk5/cts5) cts5 sclk5 function control (pefc) (in units of bits) direction control (pecr) (in units of bits) output latch (pe) stop mode syscr2 reset internal data bus pe read 0 selector 1 s 1 selector 0 s
tmp19a64c1d tmp19a64 (rev1.1) 7-43 fig. 7.13.4 port e (pe3, pe4, pe5) pe3 pe4 pe5 direction control (pecr) (in units of bits) output latch (pe) stop mode syscr2 reset internal data bus 1 selector 0 pe read s
tmp19a64c1d tmp19a64 (rev1.1) 7-44 fig. 7.13.5 port e (pe6, pe7) function control (pefc) (in units of bits) direction control (pecr) (in units of bits) output latch (pe) stop mode syscr2 internal data bus 1 selector 0 pe read pe6 (inta) pe7 (intb) s reset inta intb
tmp19a64c1d tmp19a64 (rev1.1) 7-45 port e register 7 6 5 4 3 2 1 0 pe bit symbol pe7 pe6 pe5 pe4 pe3 pe2 pe1 pe0 (0xffff_f053) read/write r/w after reset input mode (output latch register is set to "1.") port e control register 7 6 5 4 3 2 1 0 pecr bit symbol pe7c pe6c pe5c pe4c pe3c pe2c pe1c pe0c (0xffff_f057) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port e function register 7 6 5 4 3 2 1 0 pefc bit symbol pe7f pe6f pe5f pe4f pe3f pe2f pe1f pe0f (0xffff_f05b) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: port 1: intb 0: port 1: inta 0: port 0: port 0: port 0: port 1: sclk5 / cts5 0: port 1: rxd5 0: port 1: txd5 port e open drain control register 7 6 5 4 3 2 1 0 peode bit symbol pe2ode pe0ode (0xffff_f05f) read/write r r/w r r/w after reset 0 0 0 0 0 0 0 0 function 0: cmos 0: cmos 0: cmos 0: cm os 0: cmos 0: cmos 1: open drain 0: cmos 0: cmos 1: open drain function corresponding bit of pefc corresponding bit of pecr port to be used txd5 output setting 1 1 pe0 rxd3 output setting 1 0 pe1 sclk5 output setting sclk5 input setting cts5 input setting 1 1 1 1 0 0 pe2 inta input setting 1(*1) 0 pe6 intb input setting 1(*1) 0 pe7 (*1) this bit setting is used only if an interrupt must be generated to clear the stop status and if syscr is set to 0. in all other cases , this bit setting does not need to be used. fig. 7.13.6 port e registers
tmp19a64c1d tmp19a64 (rev1.1) 7-46 7.14 port f (pf0 through pf7) the port f is a general-purpose, 8-bit input/output port. fo r this port, inputs and outputs can be specified in units of bits by using the control register pfcr. a reset allows pfcr to be reset to "0" and the port f to function as an input port. besides the input/output port function, the port f performs other functions: pf0 through pf2 input and output sb1, pe3 and pe5 input the dma request signal, pf4 and pf6 output the dma acknowledge signal, and pf7 inputs external clock sources of a 32-bit time base timer. these functions are enabled by setting corresponding bits of pffc to "1." a reset allows pfcr and pffc to be cleared to "0" and the port f to function as an input port. the dmac function is shared by pf3 through pf6 and pj0 through pj3. to give pf0 through pf3 the precedence in using the dmac function, the corresponding bit of pffc must be set to "1." fig. 7.14.1 port f (pf0) function control (pffc) (in units of bits) direction control (pfcr) (in units of bits) output latch (pf) stop mode syscr2 so output sda output internal data bus pf read pf0 (so/sda) open drain setting possible pfode 0 selector 1 s 1 selector 0 s reset sda input
tmp19a64c1d tmp19a64 (rev1.1) 7-47 fig. 7.14.2 port f (pf1) function control (pffc) (in units of bits) direction control (pfcr) (in units of bits) output latch (pf) stop mode syscr2 scl output internal data bus pf read pf1 (si/scl) open drain setting possible pfode 0 selector 1 s 1 selector 0 s reset si input scl input
tmp19a64c1d tmp19a64 (rev1.1) 7-48 fig. 7.14.3 port f (pf2) function control (pffc) (in units of bits) direction control (pfcr) (in units of bits) output latch (pf) stop mode syscr2 sck output internal data bus pf read pf2 (sck) 0 selector 1 s 1 selector 0 s reset sck input
tmp19a64c1d tmp19a64 (rev1.1) 7-49 fig. 7.14.4 port f (pf3, pf5) function control (pffc) (in units of bits) direction control (pfcr) (in units of bits) output latch (pf) stop mode syscr2 reset internal data bus 1 selector 0 pf read pf3 (dreq2) pf5 (dreq3) s dreq2 input dreq3 input
tmp19a64c1d tmp19a64 (rev1.1) 7-50 fig. 7.14.5 port f (pf4, pf6) pf4 (dack2) pf6 (dack3) dack2 output dack3 output function control (pffc) (in units of bits) direction control (pfcr) (in units of bits) output latch (pf) stop mode syscr2 reset internal data bus s 0 selector 1 s 1 selector 0 pf read
tmp19a64c1d tmp19a64 (rev1.1) 7-51 fig. 7.14.6 port f (pf7) pf7 (tbtin) tbtin function control (pffc) (in units of bits) direction control (pfcr) (in units of bits) output latch (pf) stop mode syscr2 reset internal data bus 1 selector 0 pf read s
tmp19a64c1d tmp19a64 (rev1.1) 7-52 port f register 7 6 5 4 3 2 1 0 pf bit symbol pf7 pf6 pf5 pf4 pf3 pf2 pf1 pf0 (0xffff_f060) read/write r/w after reset input mode (output latch register is set to "1.") port f control register 7 6 5 4 3 2 1 0 pfcr bit symbol pf7c pf6c pf5c pf4c pf3c pf2c pf1c pf0c (0xffff_f064) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port f function register 7 6 5 4 3 2 1 0 pffc bit symbol pf7f pf6f pf5f pf4f pf3f pf2f pf1f pf0f (0xffff_f068) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: port 1: tbtin 0: port 1: dack3 0: port 1: dreq3 0: port 1: dack2 0: port 1: dreq2 0: port 1: sck 0: port 1: si / scl 0: port 1: so / sda port f open drain control register 7 6 5 4 3 2 1 0 pfode bit symbol pf1ode pf0ode (0xffff_f06c) read/write r r/w after reset 0 0 0 0 0 0 0 0 function 0: cmos 0: cmos 0: cmos 0: cmos 0: cmos 0: cmos 0: cmos 1: open drain 0: cmos 1: open drain function corresponding bit of pffc corresponding bit of pfcr port to be used so output setting sda output setting sda input setting 1 1 1 1 1 0 pf0 si input setting scl output setting scl input setting 1 1 1 0 1 0 pf1 sclk5 output setting sclk5 input setting 1 1 1 0 pf2 dreq2 input setting 1 0 pf3 dack2 output setting 1 1 pf4 dreq3 input setting 1 0 pf5 dack3 output setting 1 1 pf6 tbtin input setting 1 0 pf7 (note) the dmac function is shared by the port f and the port j. if both ports are set to use the dmac function, the port f is given priority in using the dmac function. fig. 7.14.7 port f registers
tmp19a64c1d tmp19a64 (rev1.1) 7-53 7.15 port g (pg0 through pg7) the port g is a general-purpose, 8-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register pgcr. a rese t allows pgcr to be reset to "0" and the port g to function as an input port. besides the input/output port function, the port g performs other functions: pg0 through pg3 input a 32-bit input capture trigger, and pg4 through pg7 output a 32-bit output compare. these functions are enabled by setting corresponding bits of pgfc to "1." a reset allows pgcr and pgfc to be cleared to "0" and the port g to function as an input port. fig. 7.15.1 port g (pg0 through pg3) pg0 (tc0in) pg1 (tc1in) pg2 (tc2in) pg3 (tc3in) tc0in, tc1in tc2in, tc3in function control (pgfc) (in units of bits) direction control (pgcr) (in units of bits) output latch (pg) stop mode syscr2 reset internal data bus 1 selector 0 pg read s
tmp19a64c1d tmp19a64 (rev1.1) 7-54 fig. 7.15.2 port g (pg4 through pg7) timer f/f out pg4 (tcout0) pg5 (tcout1) pg6 (tcout2) pg7 (tcout3) tcout0 tcout1 tcout2 tcout3 function control (pgfc) (in units of bits) direction control (pgcr) (in units of bits) output latch (pg) stop mode syscr2 reset internal data bus s 0 selector 1 s 1 selector 0 pg read
tmp19a64c1d tmp19a64 (rev1.1) 7-55 port g register 7 6 5 4 3 2 1 0 pg bit symbol pg7 pg6 pg5 pg4 pg3 pg2 pg1 pg0 (0xffff_f061) read/write r/w after reset input mode (output latch register is set to "1.") port g control register 7 6 5 4 3 2 1 0 pgcr bit symbol pg7c pg6c pg5c pg4c pg3c pg2c pg1c pg0c (0xffff_f065) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port g function register 7 6 5 4 3 2 1 0 pgfc bit symbol pg7f pg6f pg5f pg4f pg3f pg2f pg1f pg0f (0xffff_f069) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: port 1: tcout3 0: port 1: tcout2 0: port 1: tcout1 0: port 1: tcout0 0: port 1: tc3in 0: port 1: tc2in 0: port 1: tc1in 0: port 1: tc0in function corresponding bit of pgfc corresponding bit of pgcr port to be used tc0in input setting 1 0 pg0 tc1in input setting 1 0 pg1 tc2in input setting 1 0 pg2 tc3in input setting 1 0 pg3 tcout0 output setting 1 1 pg4 tcout1 output setting 1 1 pg5 tcout2 output setting 1 1 pg6 tcout3 output setting 1 1 pg7 fig. 7.15.2 port g registers
tmp19a64c1d tmp19a64 (rev1.1) 7-56 7.16 port h (ph0 through ph7) the port h is a general-purpose, 8-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register phcr. a rese t allows phcr to be reset to "0" and the port h to function as an input port. besides the input/output port function, the port h performs another function: ph0 through ph5 output the 32-bit output compare. this f unction is enabled by setting the corresponding bit of phfc to "1." a reset allows phcr and phfc to be cleare d to "0" and the port h to function as an input port. fig. 7.16.1 port h (ph0 through ph5) ph0 (tcout4) ph1 (tcout5) ph2 (tcout6) ph3 (tcout7) ph4 (tcout8) ph5 (tcout9) tcout4, tcout5 tcout6, tcout7 tcout8, tcout9 timer f/f out function control (phfc) (in units of bits) direction control (phcr) (in units of bits) output latch (ph) stop mode syscr2 reset internal data bus s 0 selector 1 s 1 selector 0 ph read
tmp19a64c1d tmp19a64 (rev1.1) 7-57 fig. 7.16.2 port h (ph6, ph7) ph6 ph7 direction control (phcr) (in units of bits) output latch (ph) stop mode syscr2 reset internal data bus 1 selector 0 ph read s
tmp19a64c1d tmp19a64 (rev1.1) 7-58 port h register 7 6 5 4 3 2 1 0 ph bit symbol ph7 ph6 ph5 ph4 ph3 ph2 ph1 ph0 (0xffff_f062) read/write r/w after reset input mode (output latch register is set to "1.") port h control register 7 6 5 4 3 2 1 0 phcr bit symbol ph7c ph6c ph5c ph4c ph3c ph2c ph1c ph0c (0xffff_f066) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port h function register 7 6 5 4 3 2 1 0 phfc bit symbol ph5f ph 4f ph3f ph2f ph1f ph0f (0xffff_f06a) read/write r r/w after reset 0 0 0 0 0 0 0 0 function 0: port 0: port 0: port 1: tcout9 0: port 1: tcout8 0: port 1: tcout7 0: port 1: tcout6 0: port 1: tcout5 0: port 1: tcout4 function corresponding bit of phfc corresponding bit of phcr port to be used tcout4 output setting 1 1 ph0 tcout5 output setting 1 1 ph1 tcout6 output setting 1 1 ph2 tcout7 output setting 1 1 ph3 tcout8 output setting 1 1 ph4 tcout9 output setting 1 1 ph5 fig. 7.16.3 port h registers
tmp19a64c1d tmp19a64 (rev1.1) 7-59 7.17 port i (pi0 through pi4) the port i is a general-purpose, 5-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register picr. a reset allows picr to be reset to "0" and the port i to function as an input port. besides the input/output port function, the port i performs another function: pi0 through pi4 input external interrupts. this function is enabled by setting th e corresponding bit of pifc to "1." a reset allows picr and pifc to be cleared to "0" and the port i to function as an input port. the external interrupt function is shared by pi0 through pi4 and po0 through po4. to give po0 through po4 the precedence in using the external interrupt function, the corresponding bit of pofc must be set to the interrupt function. fig. 7.17.1 port i (pi0 through pi4) pi0 (int0) pi1 (int1) pi2 (int2) pi3 (int3) pi4 (int4) function control (pifc) (in units of bits) direction control (picr) (in units of bits) output latch (pi) stop mode syscr2 internal data bus 1 selector 0 pi read s reset int0 int1 int2 int3 int4
tmp19a64c1d tmp19a64 (rev1.1) 7-60 port i register 7 6 5 4 3 2 1 0 pi bit symbol pi4 pi3 pi2 pi1 pi0 (0xffff_f063) read/write r r/w after reset input mode (output latch register is set to "1.") port i control register 7 6 5 4 3 2 1 0 picr bit symbol pi4c pi3c pi2c pi1c pi0c (0xffff_f063) read/write r r/w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port i function register 7 6 5 4 3 2 1 0 pifc bit symbol pi4f pi3f pi2f pi1f pi0f (0xffff_f06b) read/write r r/w after reset 0 0 0 0 0 0 0 0 function 0: port 1: int4 0: port 1: int3 0: port 1: int2 0: port 1: int1 0: port 1: int0 function corresponding bit of pifc corresponding bit of picr port to be used int0 input setting 1 (*1) 0 pi0 int1 input setting 1 (*1) 0 pi1 int2 input setting 1 (*1) 0 pi2 int3 input setting 1 (*1) 0 pi3 int4 input setting 1 (*1) 0 pi4 (note*1) this bit setting is used only if an interrupt must be generated to clear the stop status and if syscr is set to 0. in all other cases, this bit setting does not need to be used. (note) the external interrupt function is shared by the port i and the port o. if both ports are set to use the external interrupt function, the port o is given priority in using the external interrupt function. fig. 7.17.2 port i registers
tmp19a64c1d tmp19a64 (rev1.1) 7-61 7.18 port j (pj0 through pj3) the port j is a general-purpose, 4-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register pjcr. a reset allows pjcr to be reset to "0" and the port j to function as an input port. besides the input/output port function, the port j performs other functions: pj0 and pj2 input the dma request signal, and pj1 and pj3 output the dma acknowledge signal. these functions are enabled by setting the corresponding bits of pjfc to "1." a reset allows pjcr and pjfc to be cleared to "0" and the port j to function as an input port. the dmac function is shared by pj0 through pj3 and pf3 through pf6. to give pf0 through pf3 the precedence in using the dmac function over pj0 through pj3, the corresponding bit of pffc must be set to "1." fig. 7.18.1 port j (pj0, pj2) function control (pjfc) (in units of bits) direction control (pjcr) (in units of bits) output latch (pj) stop mode syscr2 reset internal data bus 1 selector 0 pj read s pj0 (dreq2) pj2 (dreq3) dreq2 input dreq3 input
tmp19a64c1d tmp19a64 (rev1.1) 7-62 fig. 7.18.2 port j (pj1, pj3) function control (pjfc) (in units of bits) direction control (pjcr) (in units of bits) output latch (pj) stop mode syscr2 reset internal data bus s 0 selector 1 s 1 selector 0 pj read pj1 (dack2) pj3 (dack3) dack2 output dack3 output
tmp19a64c1d tmp19a64 (rev1.1) 7-63 port j register 7 6 5 4 3 2 1 0 pj bit symbol pj3 pj2 pj1 pj0 (0xffff_f070) read/write r r/w after reset input mode (output latch register is set to "1.") port j control register 7 6 5 4 3 2 1 0 pjcr bit symbol pj3c pj2c pj1c pj0c (0xffff_f074) read/write r r/w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port j function register 7 6 5 4 3 2 1 0 pjfc bit symbol pj3f pj2f pj1f pj0f (0xffff_f078) read/write r r/w after reset 0 0 0 0 0 0 0 0 function 0: port 1: dack3 0: port 1: dreq3 0: port 1: dack2 0: port 1: dreq2 function corresponding bit of pjfc corresponding bit of pjcr port to be used dreq2 input setting 1 0 pj0 dack2 output setting 1 1 pj1 dreq3 input setting 1 0 pj2 dack3 output setting 1 1 pj3 (note) the dmac function is shared by the port f and the port j. if both ports are set to use the dmac function, the port f is given priority in using the dmac function. fig. 7.18.3 port j registers
tmp19a64c1d tmp19a64 (rev1.1) 7-64 7.19 port k (pk0 through pk7) the port k is a general-purpose, 8-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register pkcr. a rese t allows pkcr to be reset to "0" and the port k to function as an input port. besides the input/output port function, pk0 through pk7 perform the key input function. this function is enabled by setting the corresponding bit of pkfc to "1." a reset allows pkcr and pkfc to be cleared to "0" and the port k to function as an input port. the ports k0 through k7 have a pull-up resistor function. this function is enabled only if kuppup of the key-on wake-up circuit is set to "1" and if key input is enabled by kwupstn. for further details, refer to the section where key-on wake-up is discussed. if these ports are in operation, the pull-up function is disabled. fig. 7.19.1 port k (pk0 through pk7) function control (pkfc) (in units of bits) direction control (pkcr) (in units of bits) output latch (pk) stop mode syscr2 internal data bus 1 selector 0 pk read pk0 (key0), pk1 (key1) pk2 (key2), pk3 (key3) pk4 (key4), pk5 (key5) pk6 (key6), pk7 (key7) s reset pk0, pk1 pk2, pk3 pk4, pk5 pk6, pk7 kuppup
tmp19a64c1d tmp19a64 (rev1.1) 7-65 port k register 7 6 5 4 3 2 1 0 pk bit symbol pk7 pk6 pk5 pk4 pk3 pk2 pk1 pk0 (0xffff_f071) read/write r/w after reset input mode (output latch register is set to "1.") port k control register 7 6 5 4 3 2 1 0 pkcr bit symbol pk7c pk6c pk5c pk4c pk3c pk2c pk1c pk0c (0xffff_f075) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port k function register 7 6 5 4 3 2 1 0 pkfc bit symbol pk7f pk6f pk5f pk4f pk3f pk2f pk1f pk0f (0xffff_f079) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: port 1: key7 0: port 1: key6 0: port 1: key5 0: port 1: key4 0: port 1: key3 0: port 1: key2 0: port 1: key1 0: port 1: key0 function corresponding bit of pkfc corresponding bit of pkcr port to be used key0 input setting 1 0 pk0 key1 input setting 1 0 pk1 key2 input setting 1 0 pk2 key3 input setting 1 0 pk3 key4 input setting 1 0 pk4 key5 input setting 1 0 pk5 key6 input setting 1 0 pk6 key7 input setting 1 0 pk7 (*1) this bit setting is used only if an interrupt must be generated to clear the stop status and if syscr is set to 0. in all other cases , this bit setting does not need to be used. fig. 7.19.2 port k registers
tmp19a64c1d tmp19a64 (rev1.1) 7-66 7.20 port l (pl0 through pl7) the port l is a general-purpose, 8-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register plcr. a reset allows plcr to be reset to "0" and the port l to function as an input port. fig. 7.20.1 port l (pl0 through pl7) pl0 pl1 pl2 pl3 pl4 pl5 pl6 pl7 direction control (plcr) (in units of bits) output latch (pl) stop mode syscr2 reset internal data bus 1 selector 0 pl read s
tmp19a64c1d tmp19a64 (rev1.1) 7-67 port l register 7 6 5 4 3 2 1 0 pl bit symbol pl7 pl6 pl5 pl4 pl3 pl2 pl1 pl0 (0xffff_f0c0) read/write r/w after reset input mode (output latch register is set to "1.") port l control register 7 6 5 4 3 2 1 0 plcr bit symbol pl7c pl6c pl5c pl4c pl3c pl2c pl1c pl0c (0xffff_f0c4) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output ?` l ???? (``?_) 7 6 5 4 3 2 1 0 plfc bit symbol pl7f pl6f pl5f pl4f pl3f pl2f pl1f pl0f (0xffff_f0c8 ) read/write r/w ?? 0 0 0 0 0 0 0 0 C 0: port 1: db7 0: port 1: db6 0: port 1: db5 0: port 1: db4 0: port 1: db3 0: port 1: db2 0: port 1: db1 0: port 1: db0 7.20.2 ?` l vS?
tmp19a64c1d tmp19a64 (rev1.1) 7-68 7.21 port m (pm0 through pm7) the port m is a general-purpose, 8-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register pmcr. a rese t allows pmcr to be reset to "0" and the port m to function as an input port. fig. 7.21.1 port m (pm0 through pm7) pm0 pm1 pm2 pm3 pm4 pm5 pm6 pm7 direction control (pmcr) (in units of bits) output latch (pm) stop mode syscr2 reset internal data bus 1 selector 0 pm read s
tmp19a64c1d tmp19a64 (rev1.1) 7-69 port m register 7 6 5 4 3 2 1 0 pm bit symbol pm7 pm6 pm5 pm4 pm3 pm2 pm1 pm0 (0xffff_f0c1) read/write r/w after reset input mode (output latch register is set to "1.") port m control register 7 6 5 4 3 2 1 0 pmcr bit symbol pm7c pm6c pm5c pm4c pm3c pm2c pm1c pm0c (0xffff_f0c5) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output ?` m ???? (``?_) 7 6 5 4 3 2 1 0 pmfc bit symbol pm5f pm4f pm3f pm2f pm1f pm0f (0xffff_f0c9 ) read/write r r/w ?? 0 0 0 0 0 0 0 0 C 0:port 0:port 0: port 1: db13 0: port 1: db12 0: port 1: db11 0: port 1: db10 0: port 1: db9 0: port 1: db8 7.21.2 ?` m vS?
tmp19a64c1d tmp19a64 (rev1.1) 7-70 7.22 port n (pn0 through pn7) the port n is a general-purpose, 8-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register pncr. a rese t allows pncr to be reset to "0" and the port n to function as an input port. fig. 7.22.1 port n (pn0 through pn7) pn0 pn1 pn2 pn3 pn4 pn5 pn6 pn7 direction control (pncr) (in units of bits) output latch (pn) stop mode syscr2 reset internal data bus 1 selector 0 pn read s
tmp19a64c1d tmp19a64 (rev1.1) 7-71 port n register 7 6 5 4 3 2 1 0 pn bit symbol pn7 pn6 pn5 pn4 pn3 pn2 pn1 pn0 (0xffff_f0c2) read/write r/w after reset input mode (output latch register is set to "1.") port n control register 7 6 5 4 3 2 1 0 pncr bit symbol pn7c pn6c pn5c pn4c pn3c pn2c pn1c pn0c (0xffff_f0c6) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output ?` n ???? (``?_) 7 6 5 4 3 2 1 0 pnfc bit symbol pn3f pn2f pn1f pn0f (0xffff_f0c a) read/write r r/w ?? 0 0 0 0 0 0 0 0 C 0:port 0:port 0:port 0:port 0: port 1:status1 0: port 1:status0 0: port 1: fclk 0: port 1: busy 7.22.2 ?` n vS?
tmp19a64c1d tmp19a64 (rev1.1) 7-72 7.23 port o (po0 through po7) the port o is a general-purpose, 8-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register pocr. besides the input/output port function, the port o performs another function: po0 through po4 input external in terrupts. this function is enabled by setting the corresponding bit of pofc to "1." a rest allows pocr and pofc to be clear ed to "0" and the port o to function as an input port. the external interr upt function is shared by po0 through po4 and pi0 through pi4. to give po0 through po4 the precedence in using the external interrupt function, the corresponding bit of pofc must be set to the interrupt function. fig. 7.23.1 port o (po0 through po4) po0 (int0) po1 (int1) po2 (int2) po3 (int3) po4 (int4) function control (pofc) (in units of bits) direction control (pocr) (in units of bits) output latch (po) stop mode syscr2 internal data bus 1 selector 0 po read s reset int0 int1 int2 int3 int4
tmp19a64c1d tmp19a64 (rev1.1) 7-73 fig. 7.23.2 port o (po5) txd6 output po5 (txd6) open drain setting possible poode function control (pofc) (in units of bits) direction control (pocr) (in units of bits) output latch (po) stop mode syscr2 reset internal data bus po read 0 selector 1 s 1 selector 0 s
tmp19a64c1d tmp19a64 (rev1.1) 7-74 fig. 7.23.3 port o (po6) po6 (rxd6) rxd6 input function control (pofc) (in units of bits) direction control (pocr) (in units of bits) output latch (po) stop mode syscr2 reset internal data bus 1 selector 0 po read s
tmp19a64c1d tmp19a64 (rev1.1) 7-75 fig. 7.23.4 port o (po7) sclk6 output open drain setting possible poode po7 (sclk6/cts6) function control (pofc) (in units of bits) direction control (pocr) (in units of bits) output latch (po) stop mode syscr2 reset internal data bus po read 0 selector 1 s 1 selector 0 s cts6 sclk6
tmp19a64c1d tmp19a64 (rev1.1) 7-76 port o register 7 6 5 4 3 2 1 0 po bit symbol po7 po6 po5 po4 po3 po2 po1 po0 (0xffff_f0c3) read/write r/w after reset input mode (output latch register is set to "1.") port o control register 7 6 5 4 3 2 1 0 pocr bit symbol po7c po6c po5c po4c po3c po2c po1c po0c (0xffff_f0c7) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port o function register 7 6 5 4 3 2 1 0 pofc bit symbol po4f po3f po2f po1f po0f (0xffff_f0cb) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: port 1: sclk6 cts6 0: port 1: rxd6 0: port 1: txd6 0: port 1: int4 0: port 1: int3 0: port 1: int2 0: port 1: int1 0: port 1: int0 port o open drain control register 7 6 5 4 3 2 1 0 poode bit symbol po7ode po5ode (0xffff_f0cf) read/write r/w r r/w r r r r r after reset 0 0 0 0 0 0 0 0 function 0: cmos 1: open drain 0: cmos 0: cmos 1: open drain 0: cmos 0: cmos 0: cmos 0: cmos 0: cmos function corresponding bit of pofc corresponding bit of pocr port to be used int0 input setting 1(*1) 0 po0 int1 input setting 1(*1) 0 po1 int2 input setting 1(*1) 0 po2 int3 input setting 1(*1) 0 po3 int4 input setting 1(*1) 0 po4 txd6 output setting 1 1 po5 rtd6 input setting 1 0 po6 sclk6 output setting sclk6 input setting cts6 input setting 1 1 1 1 0 0 po7 (*1) this bit setting is used only if an interrupt must be generated to clear the stop status and if syscr is set to 0. in all other cases , this bit setting does not need to be used. (note) the external interrupt function is shared by the port 1 and the port 0. if both ports are set to use the external interrupt function, the port 0 is given priority in using the external interrupt function. fig. 7.23.5 port o registers
tmp19a64c1d tmp19a64 (rev1.1) 7-77 7.24 port p (pp0 through pp7) the port p is a general-purpose, 8-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register ppcr. besides the input/output port function, the port p performs another function: pp0 through pp7 output the signal for ejtag. this function is enabled by a combination of the ejtag debug level and the corresponding bit of ppfc. a reset allows ppcr and ppfc to be cleared to "0" and the port p to function as an input port. if dsu-ice is used for debugging, the port p outputs the signal for ejtag. therefore, it is recommended not to use the port p as an input/output port. fig. 7.24.1 port p (pp0 through pp7) (note) the above system diagram does not show the debug function. direction control (ppcr) (in units of bits) output buffer internal data bus selector s y 1 0 output latch (pp) function control (ppfc) (in units of bits) tpd reset selector pp read s y 1 0 stop mode syscr2 pp0 (tpd0) pp1 (tpd1) pp2 (tpd2) pp3 (tpd3) pp4 (tpd4) pp5 (tpd5) pp6 (tpd6) pp7 (tpd7) ejtag debug level
tmp19a64c1d tmp19a64 (rev1.1) 7-78 port p register 7 6 5 4 3 2 1 0 pp bit symbol pp7 pp6 pp5 pp4 pp3 pp2 pp1 pp0 (0xffff_f0d0) read/write r/w after reset input mode (output latch register is set to "1.") port p control register 7 6 5 4 3 2 1 0 ppcr bit symbol pp7c pp6c pp5c pp4c pp3c pp2c pp1c pp0c (0xffff_f0d4) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port p function register 7 6 5 4 3 2 1 0 ppfc bit symbol pp7f pp6f pp5f pp4f pp3f pp2f pp1f pp0f (0xffff_f0d8) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: port 1: tpd7/tpc7 0: port 1: tpd6/tpc6 0: port 1: tpd5/tpc5 0: port 1: tpd4/tpc4 0: port 1: tpd3/tpc3 0: port 1: tpd2/tpc2 0: port 1: tpd1/tpc1 0: port 1: tpd0/tpc0 fig. 7.24.2 port p registers note) if the port p or the port q is used to generate the output signal for ejtag, a necessary port p or q setting must be made using a tool. the ppfc register setting must be made in units of bites. level 2 level 0 level 1 ppfc=#ff ppfc #ff level 3 port p port port tpd port tpd port q port tpc port tpd tpc fig. 7.24.3 ports p and q function relative to debug levels note) for information on debug levels and other details, refer to the dsu probe handling manual.
tmp19a64c1d tmp19a64 (rev1.1) 7-79 7.25 port q (pq0 through pq7) the port q is a general-purpose, 8-bit input/output port. for this port, inputs and outputs can be specified in units of bits by using the control register pqcr. besides the input/output port function, pq0 through pq7 output the signal for ejtag. this function is enabled by a combination of a debug level and the corresponding bit of ppfc. a reset allows pqcr and ppfc to be cleared to "0" and the port q to function as an input port. if dsu-ice is used for debugging, the port q outputs the signal for ejtag. therefore, it is recommended not to use the port q as an input/output port. fig. 7.25.1 port q (pq0 through pq7) (note) the above system diagram does not show the debug function. direction control (pqcr) (in units of bits) output buffer internal data bus selector s y 1 0 output latch (pq) function control (ppfc) (in units of bits) tpd/tpc reset selector pp read s y 1 0 stop mode syscr2 pq0 (tpd0/tpc0) pq1 (tpd1/tpc1) pq2 (tpd2/tpc2) pq3 (tpd3/tpc3) pq4 (tpd4/tpc4) pq5 (tpd5/tpc5) pq6 (tpd6/tpc6) pq7 (tpd7/tpc7) ejtag debug level
tmp19a64c1d tmp19a64 (rev1.1) 7-80 port q register 7 6 5 4 3 2 1 0 pq bit symbol pq7 pq6 pq5 pq4 pq3 pq2 pq1 pq0 (0xffff_f0d1) read/write r/w after reset input mode (output latch register is set to "1.") port q control register 7 6 5 4 3 2 1 0 pqcr bit symbol pq7c pq6c pq5c pq4c pq3c pq2c pq1c pq0c (0xffff_f0d5) read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output fig. 7.25.2 port q registers
tmp19a64c1d tmp19a64 (rev1.1) 8-1 8. external bus interface the tmp19a64 has a built-in external bu s interface function to connect to ex ternal memory, i/os, etc. this interface consists of an external bus interface circu it (ebif), a chip selector (cs) and a wait controller. the chip selector and wait controller designate mapping addresses in a 6-block address space and also control wait states and data bus widths (8- or 16-bit) in these and other external address spaces. the external bus interface circ uit (ebif) controls the timing of external buses based on the chip selector and wait controller settings. the ebif also controls the dynami c bus sizing and the bus arbi tration with the external bus master. z external bus mode selectable address, data separator bus mode and multiplex mode z wait function this function can be enabled for each block. ? a wait of up to 7 clocks can be automatically inserted. ? a wait can be inserted via the wait / rdy pin. z data bus width either an 8- or 16-bit width can be set for each block. z recovery cycle (read/write) if an external bus cycle is in progress, a dummy cycl e of up to 2 clocks can be inserted and this dummy cycle can be specified for each block. z recovery cycle (chip selector) when an external bus is selected, a dummy cycle of up to 1 clock can be inserted and this dummy cycle can be specified for each block. z bus arbitration function
tmp19a64c1d tmp19a64 (rev1.1) 8-2 8.1 address and data pins (1) address and data pin settings the tmp19a64 can be set to either separate bus or multiplexed bus mode. setting the busmd pin to the "l" level at a reset activates the separate bus mode , and setting the pin to the "h" level activates the multiplexed bus mode. port pins 0, 1, 2, 5 and 6, which are to be connected to external devices (memory), are used as address buses, data buses and address/data buses. table 8.1.1 shows these. table 8.1.1 bus mode, address and data pins separate multiplex busmd="l" busmd="h" port 0 (p00 to p07) d0-d7 ad0-ad7 port 1 (p10 to p17) d8-d15 ad8-ad15/a8-a15 port 2 (p20 to p27) a16-a23 a0-a7/a16-a23 port 5 (p50 to p57) a0-a7 general-purpose port port 6 (p60 to p67) a8-a15 general-purpose port port 37 (p37) general-purpose port ale each port is put into input mode af ter a reset. to access an external device, set the address and data bus functions by using the port control register (pncr) and the port function register (pnfc). in the multiplex mode, the four types of functions can be selected, as shown in table 8.1.2, by setting the port registers (pncr and pnfc). table 8.1.2 address and data pins in the multiplex mode c d e f number of address buses max.24 (-16 mb) ma x.24 (-16 mb) max.16 (-64 kb) max.8 (-256 b) number of data buses 8 16 8 16 number of address/data multiplexed buses 8 16 0 0 port 0 ad0 to ad7 ad0 to ad7 ad0 to ad7 ad0 to ad7 port 1 a8 to a15 ad8 to ad15 a8 to a15 ad8 to ad15 port function port 2 a16 to a23 a16 to a23 a0 to a7 a0 to a7 timing diagram (note 1) even in cases of e and f , address outputs are available as the data bus pins are also used for address buses. (note 2) ports 0 to 2 are put into input modes after a reset, and they do not serve as address or data bus pins. (note 3) any of c to f can be selected by setting the p1cr, p1fc, p2cr and p2fc registers. (note 1) a7-0 a23-8 a23-8 a7-0 d7-0 ad7-0 ale rd a15 -0 a23-16 a23-16 d15 -0 ad15-0 ale rd a7-0 a15-0 a15-0 d7-0 ad7-0 ale rd a15 -0 a7-0 d15 -0 ad15-0 ale rd (note1)
tmp19a64c1d tmp19a64 (rev1.1) 8-3 (2) address hold when an internal area is accessed when an internal area is being accessed, the address bus maintains the address ou tput of the previously accessed external area and doesn't change it. also, the data bus is in a state of high impedance. 8.2 data format internal registers and external bus interfaces of the tmp19a64 are configured as described below. (1) big-endian mode c word access ? 16-bit bus width internal registers external buses ? 8-bit bus width internal registers external buses d half word access ? 16-bit bus width internal registers external buses address d31 aa x0 bb x1 aabb ccdd cc x2 d00 dd x3 a1=0 a1=1 ms ls address d31 aa x0 bb x1 cc x2 d00 dd x3 aa bb cc dd x0 x1 x2 x3 address d31 aabb aa x0 d00 bb x1 ms ls address d31 ccdd cc x2 d00 dd x3 ms ls
tmp19a64c1d tmp19a64 (rev1.1) 8-4 ? 8-bit bus width internal registers external buses internal registers external buses e byte access ? 16-bit bus width internal registers external buses address d31 aa x0 d00 bb x1 a b x0 x1 address d31 cc x2 d00 dd x3 cd x2 x3 address d31 aa d00 aa x0 address d31 bb d00 bb x1 address d31 cc d00 cc x2 address d31 dd d00 dd x3 ms ls ms ls ms ls ms ls
tmp19a64c1d tmp19a64 (rev1.1) 8-5 ? 8-bit bus width internal registers external buses address d31 aa d00 aa x0 address d31 bb d00 bb x1 address d31 cc d00 cc x2 address d31 dd d00 dd x3
tmp19a64c1d tmp19a64 (rev1.1) 8-6 (2) little-endian mode c word access ? 16-bit bus width internal registers external buses ? 8-bit bus width internal registers external buses d half word access ? 16-bit bus width internal registers external buses address d31 dd x3 cc x2 aabb ccdd bb x1 d00 aa x0 a1=0 a1=1 ls ms address d31 dd x3 cc x2 bb x1 d00 aa x0 aa bb cc dd x0 x1 x2 x3 address d31 aabb bb x1 d00 aa x0 ls ms address d31 ccdd dd x3 d00 cc x2 lsb msb
tmp19a64c1d tmp19a64 (rev1.1) 8-7 ? 8-bit bus width internal registers external buses internal registers external buses e byte access ? 16-bit bus width internal registers external buses address d31 bb x1 d00 aa x0 aa bb x0 x1 address d31 dd x3 d00 cc x2 cc dd x2 x3 address d31 aa d00 aa x0 address d31 bb d00 bb x1 address d31 cc d00 cc x2 address d31 dd d00 dd x3 lsb msb lsb msb lsb msb lsb msb
tmp19a64c1d tmp19a64 (rev1.1) 8-8 ? 8-bit bus width internal registers external buses address d31 aa d00 aa x0 address d31 bb d00 bb x1 address d31 cc d00 cc x2 address d31 dd d00 dd x3
tmp19a64c1d tmp19a64 (rev1.1) 8-9 8.3 external bus operations (separate bus mode) this section describes various bus timing values. the timing diagram shown below assumes that the address buses are a23 through a0 and that the data buses are d15 through d0. (1) basic bus operation the external bus cycle of the tmp19a 64 basically consists of three clock pulses and a wait can be inserted as mentioned later. the basic clock of an external bu s cycle is the same as the internal system clock. fig. 8.3.1 shows read bus timing and fig. 8.3.2 shows write bus timing. if internal areas are accessed, address buses remain unchanged as shown in these figu res. additionally, data buses are in a state of high impedance and control signals such as rd and wr do not become active. fig. 8.3.1 read operation timing diagram fig. 8.3.2 write operation timing diagram no output of wr external access internal access d [15:0] output high ? z data tsys rd no output of rd a [23:0] address hold csn external access internal access d [15:0] output high ? z data tsys a [23:0] address hold csn wr
tmp19a64c1d tmp19a64 (rev1.1) 8-10 (2) wait timing a wait cycle can be inserted for each block by usin g the chip selector (cs) and wait controller. the following three types of wait can be inserted: c a wait of up to 7 clocks can be automatically inserted. d a wait can be inserted via the wait pin (2+2n, 3+2n, 4+2n, 5+2n, 6+2n, 7+2n). note: 2n is the number of external waits that can be inserted. e a wait can be inserted via the rdy pin (2+2n, 3+2n, 4+2n, 5+2n, 6+2n, 7+2n). note: 2n is the number of external waits that can be inserted. the setting of the number of waits to be automatically inserted and the setting of the external wait input can be made using the chip selector and wait controller registers, bmncs. fig. 8.3.3 through fig. 8.3.10 show the timing diagrams in which waits have been inserted. fig. 8.3.3 read operation timing diagram (0 wait and 1 wait automatically inserted) fig. 8.3.4 read operation timing diagram (5 waits automatically inserted) a[23:0] d[15:0] rd tsys address data 5 wait a[23:0] d[15:0] rd address address data data 0 wait 1 wait tsys
tmp19a64c1d tmp19a64 (rev1.1) 8-11 fig. 8.3.5 shows the read operation timing when 0 wait, waits automatically inserted, and waits automatically inserted + external waits are inserted in the separate bus mode. fig. 8.3.5 read operation timing diagram tsys fsys 0 wait 2 waits automatically inserted 2 waits automatically inserted 2 waits automatically inserted + 2n (n=1) 2n_wait 3 waits automatically inserted + 2n (n=1) 2n_wait 2 waits automatically inserted + 2n (n=2) 2n_wait a [23:0] d[15:0] /rd /rd /wait a [23:0] d[15:0] /rd a [23:0] d[15:0] a [23:0] d[15:0] /rd /wait /wait /wait a [23:0] d[15:0] /rd /wait z --- external wait sampling point external wait sampling points take place before a cycle of waits automatically inserted is finished and before a 2n_wait cycle is finished as shown above. the same a pp lies to combinations of other numbers of waits. 2 waits automatically inserted 3 waits automatically inserted 2 waits automatically inserted
tmp19a64c1d tmp19a64 (rev1.1) 8-12 fig. 8.3.6 shows the write operation timing when 0 wait, waits automatically inserted, and waits automatically inserted + external waits are inserted in the separate bus mode. tsys fs y s 0 wait 2 waits automatically inserted 2 waits automatically inserted 2 waits automatically inserted + 2n (n=1) 2 waits automatically inserted 2n_wait 3 waits automatically inserted + 2n (n=1) 3 waits automatically inserted 2n_wait 2 waits automatically inserted + 2n (n=2) 2 waits automatically inserted 2n_wait /wait a [23:0] d [ 15:0 ] a[ 23:0 ] d[15:0] /wr /wait /wait /wr a[ 23:0 ] d[15:0] /wr /wr /wait a[ 23:0 ] d[15:0] a [23:0] d[15:0] /wr /wait z --- external wait sampling point external wait sampling points take place before a cycle of waits automatically inserted is finished and before a 2n_wait cycle is finished as shown above. the same applies to combinations of other numbers of waits. fig. 8.3.6 write operation timing diagram
tmp19a64c1d tmp19a64 (rev1.1) 8-13 by setting the bit 3 of port 3 f unction register p3fc to "1," the wait input pin (p33) can also serve as the rdy input pin. the rdy input is input to the external bus inte rface circuit as the logical reverse of the wait input. the number of waits is specified by the chip sele ctor and wait controller register, bmncs. fig. 8.3.7 shows the rdy inputs and the number of waits. tsys fsys 2 waits automatically inserted 2 waits automatically inserted 2 waits automatically inserted + 2n (n=1) 2 waits automatically inserted 2n_wait /rdy /rd y a [23:0] d[15:0] /rd / rd a[ 23:0 ] d [ 15:0 ] z --- external rdy sampling point external rdy sampling points take place before a cycle of waits automatically inserted is finished and before a 2n_wait cycle is finished as shown above. the same applies to combinations of other numbers of waits. fig. 8.3.7 rdy input and wait operation timing diagram
tmp19a64c1d tmp19a64 (rev1.1) 8-14 (3) time that it takes before ale is asserted when the external bu s of the tmp19a64 is used as a multiplexed bus, the ale width (assert time) can be specified by using the system control register syscr3 in the cg. in the case of a separate bus mode, ale is not output, but the time from when an address is esta blished to the assertion of the rd or wr signal is different depending on the syscr3. during a reset, = "1" is set and the rd or wr signal is asserted as a point of two system (internal) clocks after an address is established. if is cleared to "0," the rd or wr signal is asserted at a point of one system (internal) clock after an address is esta blished. this assert setting cannot be established for each block in an external area an d the same setting is commonly used in an external address space. fig. 8.3.13 syscr3 set va lue and external bus operation a[23:0] d[15:0] rd address address data data ="0" tsys ="1"
tmp19a64c1d tmp19a64 (rev1.1) 8-15 (4) recovery time if access to external areas occurs consecutively, a dummy cycle can be inserted for recovery time. a dummy cycle can be inserted in both a read and a write cycle. the dummy cycle insertion setting can be made in the chip selector and wait controller regi sters, bmncs (wr ite recovery cycle) and (read recovery cycle). as for the number of dummy cycles, one or two system clocks (internal) can be specified for each block. fig. 8.3.14 shows the timing of recovery time insertion. fig. 8.3.14 timing of recovery time insertion cs a[23:0] rd wr address next address tsys no recovery cycle cs a[23:0] rd wr address next address tsys 1 recovery cycle 2 recovery cycle
tmp19a64c1d tmp19a64 (rev1.1) 8-16 (5) chip selector recovery time if access to external areas occurs consecutively, a dummy cycle can be inserted for recovery time. the dummy cycle insertion setting ca n be made in the chip selector and wait controller registers, bmncs. as for the number of dummy cycles , one system clock (internal) can be specified for each block. fig. 8.3.15 shows the timing of recovery time insertion. cs a[23:0] rd wr address next address ts y s no recovery cycle 1 recovery cycle
tmp19a64c1d tmp19a64 (rev1.1) 8-17 8.4 external bus operations (multiplexed bus mode) this section describes various bus timing values. th e timing diagram shown below assumes that the address buses are a23 through a16 and that the address/data buses are ad15 through ad0. (1) basic bus operation the external bus cycle of the tmp19a 64 basically consists of three clock pulses and a wait can be inserted as mentioned later. the basic clock of an external bu s cycle is the same as the internal system clock. fig. 8.4.1 shows read bus timing and fig. 8.4.2 shows write bus timing. if internal areas are accessed, address buses remain unchanged and the ale does not output latch pulse as shown in these figures. additionally, address/data buses are in a state of high impedance and control signals such as rd and wr do not become active. a [23:16] a d [15:0] a le rd external access internal access output hi ? z no output of ale no output of rd higher-order address hold adr data tsys csn fig. 8.4.1 read operation timing diagram a [23:16] a d [15:0] a le wr external area output hi ? z no output of ale no output of wr higher-order address adr data tsys csn internal area fig. 8.4.2 write operation timing diagram
tmp19a64c1d tmp19a64 (rev1.1) 8-18 (2) wait timing a wait cycle can be inserted for each block by usin g the chip selector (cs) and wait controller. the following three types of wait can be inserted: c a wait of up to 7 clocks can be automatically inserted. d a wait can be inserted via the wait pin (2+2n, 3+2n, 4+2n, 5+2n, 6+2n, 7+2n). note: 2n is the number of extern al waits that can be inserted. e a wait can be inserted via the rdy pin (2+2n, 3+2n, 4+2n, 5+2n, 6+2n, 7+2n). note: 2n is the number of extern al waits that can be inserted. the setting of the number of waits to be automatically in serted and the setting of the external wait input can be made using the chip selector and wait controller registers, bmncs.
tmp19a64c1d tmp19a64 (rev1.1) 8-19 fig. 8.4.3 shows the read operation timing when 0 wait, waits automatically inserted, and waits automatically inserted + external waits are inserted in the multiplexed bus mode. fig. 8.4.3 read operation timing diagram tsys fsys 0 wait 2 waits automatically inserted 2 waits automatically inserted 2 waits automatically inserted + 2n (n=1) 2n_wait 3 waits automatically inserted + 2n (n=1) 2n_wait 2 waits automatically inserted + 2n (n=2) 2n_wait a d[15:0] a le /wait /wait /rd a [23:16] /rd a [23:16] a d[15:0] /rd /wait a d[15:0] a le a [23:16] a d[15:0] a le /wait /wait /rd a le a [23:16] a [23:16] a d[15:0] a le /rd data z --- external wait sampling point external wait sampling points take place before a cycle of waits automatically inserted is finished and before a 2n_wait cycle is finished as shown above. the same applies to combinations of other numbers of waits. higher-order address lower-order address higher-order address lower-order address data higher-order address lower-order address data higher-order address lower-order address data data higher-order address lower-order address 2 waits automatically inserted 3 waits automatically inserted 2 waits automatically inserted
tmp19a64c1d tmp19a64 (rev1.1) 8-20 fig. 8.4.4 shows the write operation timing when 0 wait, waits automatically inserted, and waits automatically inserted + external waits are inserted in the multiplexed bus mode. fig. 8.4.4 write operation timing diagram tsys fsys 0 wait 2 waits automatically inserted 2 waits automatically inserted 2 waits automatically inserted + 2n (n=1 ) 2 waits automatically inserted 2n_wait 3 waits automatically inserted + 2n (n=1) 2 waits automatically inserted 2n_wait 2 waits automatically inserted + 2n (n=2) 2 waits automatically inserted 2n_wait /wait /wr a le a le a [23:16] /wr a [23:16] a d[15:0] a [23:16] a d[15:0] /wr /wait a d[15:0] a le /wait /wait /wr a [23:16] a d[15:0] a le a [23:16] a d[15:0] a le /wr /wait higher-order address lowe r -order address data lowe r -order address data z --- external wait sampling point external wait sampling points take place before a cycle of waits automatically inserted is finished and before a 2n_wait cycle is finished as shown above. the same applies to combinations of other numbers of waits. lower-order address data lower-order address data higher-order address higher-order address higher-order address higher-order address lowe r -order address data
tmp19a64c1d tmp19a64 (rev1.1) 8-21 (3) time that it takes before ale is asserted either 1 clock or 2 clocks can be se lected as the time that it takes before ale is asserted. the setting bit is located in the system clock control register. the default is 2 clocks. this assert setting cannot be established for each block in an external area and the same setting is commonly used in an external address space. a le (alesel = 0) a d [15:0] (alesel = 1) a d [15:0] 1 clock tsys 2 clocks fig. 8.4.12 time that it takes before ale is asserted fig. 8.4.13 shows the timing when the ale is 1 clock or 2 clocks. fig. 8.4.13 read operation timing diagram (when the ale is 1 clock or 2 clocks) when the ale is 1 clock or 2 clocks tsys fsys a [23:16] a d[15:0] a le /rd data higher-order address lower-order address data higher-order address
tmp19a64c1d tmp19a64 (rev1.1) 8-22 (4) read and write recovery time if access to external areas occurs consecutively, a dummy cycle can be inserted for recovery time. a dummy cycle can be inserted in both a read and a write cycle. the dummy cycle insertion setting can be made in the chip selector and wait controller regi sters, bmncs (wr ite recovery cycle) and (read recovery cycle). as for the number of dummy cycles, one or two system clocks (internal) can be specified for each block. fig. 8.4.14 shows the timing of recovery time insertion. fig. 8.4.14 timing of recovery time insertion when read/write recovery is inserted (ale width:1fsys) ts y s fs y s dummy cycle dummy cycle normal cycle 1 recovery cycle 2 recovery cycles /cs /rd,/wr a [23:16] a d[15:0] a le data hi g he r -order address lowe r -order address data higher-order address lower-order address data higher-order address lower-order address
tmp19a64c1d tmp19a64 (rev1.1) 8-23 (5) chip selector recovery time if access to external areas occurs consecutively, a dummy cycle can be inserted for recovery time. the dummy cycle insertion setting ca n be made in the chip selector and wait controller registers, bmncs. as for the number of dummy cycles , one system clock (internal) can be specified for each block. fig. 8.4.15 shows the timing of recovery time insertion. when chip selector recovery is inserted (ale width:1fsys) tsys fsys dummy cycle normal cycle chip selector recovery cycle /rd,/wr /cs a [23:16] a d[15:0] a le data higher-order address lower-order address data higher-order address lower-order address
tmp19a64c1d tmp19a64 (rev1.1) 8-24 8.5 bus arbitration the tmp19a64 can be connected to an external bus mast er. the arbitration of bus control authority with the external bus master is execut ed by using the two signals, busrq and busak . the external bus master can acquire control authority for tmp19a64 external buses on ly, and cannot acquire cont rol authority for internal buses. (1) accessible range of external bus master the external bus master can acquir e control authority for tmp19a64 external buses only, and cannot acquire control authority for internal buses (g-bus). therefore, the external bus master cannot access the internal memories or the internal i/o. the arbitration of bus control authority for exte rnal buses is executed by the external bus in terface circuit (ebif), and th is is independent of the cp u and the internal dmac. even when the external bus master holds the external bus control au thority, the cpu and the internal dmac can access the internal rom, ram and registers. on the other hand, if the cpu or the internal dmac tries to access an external memory when the ex ternal bus master holds the external bus control authority, the cpu or the internal dmac has to wait until the external bus ma ster releases the bus. for this reason, if the busrq remains active, the tmp19a64 can lock. (2) acquisition of bus control authority the external bus master requests the tmp19a64 for bus control author ity by asserting the busrq signal. the tmp19a64 samples the busrq signal at the break of external bus cycles on the internal buses (g- bus) and determines whether or not to give the bus control authority to the external bus master. when it gives the bus control authority to th e external bus master, it asserts the busak signal. at the same time, it makes address buses, data buses and bus control signals ( rd and wr ) in a state of high impedance. (the internal pull-up is enabled for the w r/ , hwr and csx .) depending on the relationship between the size of data to be loaded or stored and the external memory bus width, two or more bus cycles can occur in response to a single data transfer (bus si zing). in this case, the end of the last bus cycle is th e break of external bus cycles. if access to external areas occurs consecutively on th e tmp19a64, a dummy cycle can be inserted. again, requests for buses are accepted at the break of external bus cycles on the internal buses (g-bus). during a dummy cycle, the next external bus cy cle is already started on the internal buses. therefore, even if the busrq signal is asserted during a dummy cycle, the bus is not released until the next external bus cycle is completed. keep asserting the busrq signal until the bus cont rol authority is released. fig. 8.5.1 shows the timing of acquiring bus control authority by the external bus master.
tmp19a64c1d tmp19a64 (rev1.1) 8-25 c d e internal address external address tmp19a64 external access tmp19a64 external access external bus master cycle tmp19a64 external access tsys busrq busak tmp19a64 external access c busrq is at the "h" level. d the tmp19a64 recognizes that the busrq is at the "l" level, and releas es the bus at the end of the bus cycle. e when the bus is completed, the tmp19a64 asserts busak . the external bus master recognizes that the busak is at the "l" level, and acquires the bus control authority to start bus operations. fig. 8.5.1 bus control authority acquisition timing (3) release of bus control authority the external bus master releases the bus control authority when it becomes unnecessary. if the external bus master no longer needs the bus control authority that it has held, it deasserts the busrq signal and returns the bus cont rol authority to the tmp19a64. fig. 8.5.2 shows the timing of releasing unnecessary bus control authority. internal address external address tmp19a64 external access tmp19a64 external access tmp19a64 external access external bus master cycle tmp19a64 external access cde tsys busrq busak c the external bus master has the bus control authority. d the external bus master deasserts the busrq , as it no longer requires the bus contro l authority. e the tmp19a64 rec ognizes that the busrq is at the "h" level, and deasserts the busak . fig. 8.5.2 timing of releasing bus control authority
tmp19a64c1d tmp19a64 (rev1.1) 9-1 9. the chip selector and wait controller the tmp19a64 can be connected to external devices (i/o devices, rom and sram). 6-block address spaces (cs0 through cs 5) can be established in the tmp19a64 and three parameters can be specified for each 4-block address and other address spaces : data bus width, the number of waits and the number of dummy cycles. cs0 through cs5 (also used as p40 through p45) are the outp ut pins corresponding to spaces cs0 through cs5. these pins generate chip selector signals (f or rom and sram) to each sp ace when the cpu designates an address in which spaces cs0 through cs5 are selected. for chip selector signals to be generated, however, the port 4 controller register (p4cr) and the port 4 fu nction register (p4fc) must be set appropriately. the specification of the spaces cs0 through cs5 is to be performed with a combination of base addresses (ban, n = 0 to 5) and mask addresses (man, n = 0 to 5) using the base and mask address setting registers (bma0 through bma5). meanwhile, master enable, data bus width, the number of waits and the number of dummy cycles for each address space are specified in the chip selector and wait controller registers (b01cs, b23cs, b45cs and bexcs). a bus wait request pin ( wait ) is provided as an input pin to co ntrol the status of these settings. 9.1 specifying address spaces spaces cs0 through cs5 are specified using the base and mask addre ss setting registers (bma0 through bma5). in each bus cycle, a comparison is made to see if each address on the bu s is located in th e space cs0 through cs5. if the result of a comparison is a match, it is considered that the designated cs space has been accessed and chip selector signals are output from pins cs0 through cs5 and the operations specified by the chip selector and wait controller registers (b01cs, b23cs an d b45cs) are executed. (refer to "9.2 the chip selector and wait controller.") 9.1.1 base and mask address setting registers figures 9.1.1 to 3 show base and mask address setting re gisters. for base addresses (ba0 through ba5), a start address in the space cs0 through cs5 is specified. in each bus cycle, the chip selector and wait controller compare values in their registers with addresses and th ose addresses with address bits masked by the mask address (ma0 through ma5) are not comp ared. the size of an address space is determined by the mask address setting. (1) base addresses base address ban specifies the higher-ord er 16 bits (a31 through a16) of the start address. the lower-order 16 bits (a15 to a0) of the start address are always set to "0." therefore, the start address begins with 0x0000_0000h and increases in 64 kilobyte units. fig. 9.1.4 shows the relationship between the start address and the ban value. (2) mask addresses mask address (man) specifies which address bit valu e is to be compared. th e address on the bus that corresponds to the bit for which "0" is written on th e address mask man is to be in cluded in address comparison to determine if the address is in th e area of the cs0 to cs5 spaces. th e bit for which "1" is written is not included in address comparison.
tmp19a64c1d tmp19a64 (rev1.1) 9-2 cs0 to cs5 spaces have different address bi ts that can be masked by ma0 to ma5. cs0 space and cs1 space: a29 through a14 cs2 space and cs3 space: a30 through a15 cs4 space and cs5 space: a30 through a15 (note) address settings must be made using physical addresses.
tmp19a64c1d tmp19a64 (rev1.1) 9-3 base and mask address setting registers bma0 (0xffff_ e400h)-bma5 (0 xffff_e414h) 31 30 29 28 27 26 25 24 bma0 bit symbol ba0 (0xffff_e400h) read/write r/w after reset 0 0 0 0 0 0 0 0 function a31 to a24 to be set as a start address 23 22 21 20 19 18 17 16 bit symbol ba0 read/write r/w after reset 0 0 0 0 0 0 0 0 function a23 to a16 to be set as a start address 15 14 13 12 11 10 9 8 bit symbol ma0 read/write r/w after reset 0 0 0 0 0 0 1 1 function make sure that you write "0." 7 6 5 4 3 2 1 0 bit symbol ma0 read/write r/w after reset 1 1 1 1 1 1 1 1 function cs0 space size setting 0: address for comparison 31 30 29 28 27 26 25 24 bma1 bit symbol ba1 (0xffff_e404h) read/write r/w after reset 0 0 0 0 0 0 0 0 function a31 to a24 to be set as a start address 23 22 21 20 19 18 17 16 bit symbol ba1 read/write r/w after reset 0 0 0 0 0 0 0 0 function a23 to a16 to be set as a start address 15 14 13 12 11 10 9 8 bit symbol ma1 read/write r/w after reset 0 0 0 0 0 0 1 1 function make sure that you write "0." 7 6 5 4 3 2 1 0 bit symbol ma1 read/write r/w after reset 1 1 1 1 1 1 1 1 function cs1 space size setting 0: address for comparison (note) make sure that you write "0" for bits 10 through 15 for bma0 and bma1. the size of both the cs0 and cs1 spaces can be a minimum of 16 kb to a maximum of 1 gb. the external address space of the tmp19a64 is 16 mb and so bits 10 through 15 must be set to "0" as addresses a24 through a29 are not masked. fig. 9.1.1 base and mask addres s setting registers (bma0, bma1)
tmp19a64c1d tmp19a64 (rev1.1) 9-4 31 30 29 28 27 26 25 24 bma2 bit symbol ba2 (0xffff_e408h) read/write r/w after reset 0 0 0 0 0 0 0 0 function a31 to a24 to be set as a start address 23 22 21 20 19 18 17 16 bit symbol ba2 read/write r/w after reset 0 0 0 0 0 0 0 0 function a23 to a16 to be set as a start address 15 14 13 12 11 10 9 8 bit symbol ma2 read/write r/w after reset 0 0 0 0 0 0 0 1 function make sure that you write "0." 7 6 5 4 3 2 1 0 bit symbol ma2 read/write r/w after reset 1 1 1 1 1 1 1 1 function cs2 space size setting 0: address for comparison 31 30 29 28 27 26 25 24 bma3 bit symbol ba3 (0xffff_e40ch) read/write r/w after reset 0 0 0 0 0 0 0 0 function a31 to a24 to be set as a start address 23 22 21 20 19 18 17 16 bit symbol ba3 read/write r/w after reset 0 0 0 0 0 0 0 0 function a23 to a16 to be set as a start address 15 14 13 12 11 10 9 8 bit symbol ma3 read/write r/w after reset 0 0 0 0 0 0 0 1 function make sure that you write "0." 7 6 5 4 3 2 1 0 bit symbol ma3 read/write r/w after reset 1 1 1 1 1 1 1 1 function cs3 space size setting 0: address for comparison (note) make sure that you write "0" for bits 9 through 15 for bma2 and bma3. the size of both the cs2 and cs3 spaces can be a minimum of 32 kb to a maximum of 2 gb. the external address space of the tmp19a64 is 16 mb and so bits 9 through 15 must be set to "0" as addresses a24 through a30 are not masked. fig. 9.1.2 base and mask addres s setting registers (bma2, bma3)
tmp19a64c1d tmp19a64 (rev1.1) 9-5 31 30 29 28 27 26 25 24 bma4 bit symbol ba4 (0xffff_e410h) read/write r/w after reset 0 0 0 0 0 0 0 0 function a31 to a24 to be set as a start address 23 22 21 20 19 18 17 16 bit symbol ba4 read/write r/w after reset 0 0 0 0 0 0 0 0 function a23 to a16 to be set as a start address 15 14 13 12 11 10 9 8 bit symbol ma4 read/write r/w after reset 0 0 0 0 0 0 0 1 function make sure that you write "0." 7 6 5 4 3 2 1 0 bit symbol ma4 read/write r/w after reset 1 1 1 1 1 1 1 1 function cs4 space size setting 0: address for comparison 31 30 29 28 27 26 25 24 bma5 bit symbol ba5 (0xffff_e414h) read/write r/w after reset 0 0 0 0 0 0 0 0 function a31 to a24 to be set as a start address 23 22 21 20 19 18 17 16 bit symbol ba5 read/write r/w after reset 0 0 0 0 0 0 0 0 function a23 to a16 to be set as a start address 15 14 13 12 11 10 9 8 bit symbol ma5 read/write r/w after reset 0 0 0 0 0 0 0 1 function make sure that you write "0." 7 6 5 4 3 2 1 0 bit symbol ma5 read/write r/w after reset 1 1 1 1 1 1 1 1 function cs5 space size setting 0: address for comparison (note) make sure that you write "0" for bits 9 through 15 for bma4 and bma5. the size of both the cs4 and cs5 spaces can be a minimum of 32 kb to a maximum of 2 gb. the external address space of the tmp19a64 is 16 mb and so bits 9 through 15 must be set to "0" as addresses a24 through a30 are not masked. fig. 9.1.3 base and mask addres s setting registers (bma4, bma5)
tmp19a64c1d tmp19a64 (rev1.1) 9-6 start address base address value (ban) 0xffff_0000h 0xffff_ffffh ffffh address 0x0000_0000h 64 kb 0x0006_0000h 0006h 0x0005_0000h 0005h 0x0004_0000h 0004h 0x0003_0000h 0003h 0x0002_0000h 0002h 0x0001_0000h 0001h 0x0000_0000h 0000h fig. 9.1.4 start and base address register values 9.1.2 how to define start addresses and address spaces ? to specify a space of 64 kb star ting at 0xc000_0000 in the cs0 space, the base and mask address registers must be programmed as shown below. 31 1615 0 ba0 ma0 1 1 0 00 0 0 0 0 0000000000000000 0 0 0 0 0 1 1 c 0 0 0 0 0 0 3 values to be set in the base and mask address registers (bma0) in the base address (ba0), specify "0xc000" that corresp onds to higher 16 bits of a start address, while in the mask address (ma0), specify whet her a comparison of addresses in the space a29 through a16 is to be made or not. to ensure a comparison of a29 through a16, set bits 15 to 2 of the mask address (ma0) to "0." a comparison of addresses of a31 and a30 will definitely be made. this setting allows a31 through a16 to be compared w ith the value specified as a start addres s. as a15 through a0 are masked, a space of 64 kb from 0xc000_0000 to 0xc000_ffff is desi gnated as a cs0 space and the cso signal is asserted if there is a match with an address on the bus.
tmp19a64c1d tmp19a64 (rev1.1) 9-7 ? to specify a space of 1 mb star ting at 0x1fd0_0000 in the cs2 sp ace, the base and mask address registers must be programmed as shown below. 31 1615 0 ba2 ma2 0 0 0 11 1 1 1 1 1010000000000000 0 0 1 1 1 1 1 1 f d 0 0 0 1 f values to be set in the base and mask address registers (bma2) in the base address (ba2), specify "0x1fd0" that corresponds to higher 16 bits of a start address, while in the mask address (ma2), specify whet her a comparison of addresses in the space a30 through a15 is to be made or not. to ensure a comparison of a30 through a20, set bits 15 to 5 of the mask address (ma2) to "0." a comparison of a3 1 will definitely be made. this setting allows a31 through a20 to be compared w ith the value specified as a start addres s. as a19 through a0 are masked, a space of 1 mb from 0x1 fd0_0000 to 0x1f df_ffff is designated as a cs2 space. note: the csn signal is not asserted to the following address spaces in the tmp19a64: 0x1fc0_0000 to 0x1fcf_ffff 0x4000_0000 to 0x400f_ffff 0xfffd_6000 to 0xfffd_ffff, 0xffff_6000 to 0xffff_dfff after a reset, the cs0, cs1, and cs3 through cs5 spaces are disabled , while the whole cs2 space (4 gb) is enabled as an address space.
tmp19a64c1d tmp19a64 (rev1.1) 9-8 table 9.1.1 shows the relationship between cs space and space sizes. if two or more address spaces are specified simultaneously, a space or spaces with a smaller space number will be given priority in space selection. example: 0xc000_0000 as a start address of the cs0 space with a space size of 16 kb 0xc000_0000 as a start address of the cs1 space with a space size of 64 kb table 9.1.1 cs space and space sizes size (bytes) cs space 16 k 32 k 64 k 128 k 256 k 512 k 1 m 2 m 4 m 8 m 16 m cs0 { { { { { { { { { { { cs1 { { { { { { { { { { { cs2 { { { { { { { { { { cs3 { { { { { { { { { { cs4 { { { { { { { { { { cs5 { { { { { { { { { { 0xc000_0000 0xc000_3fff 0xc000_0000 0xc000_3fff 0xc000_ffff cs1 space cs0 space if a space of 0xc000_0000 to 0xc000_3fff is accessed, the cs0 space is selected.
tmp19a64c1d tmp19a64 (rev1.1) 9-9 9.2 the chip selector and wait controller fig. 9.2.1 to fig. 9.2.4 show the chip selector and wait controller registers. for each address space (spaces cs0 through cs5 and other address spaces), each chip selector and wait controller register (b01cs through b45cs, bexcs) can be programmed to set master enable or disable, to select data bus width, to specify the number of waits and to insert dummy cycles. if two or more address spaces are specified simultane ously, a space or spaces with a smaller space number will be given priority in space selection (order of priority: cs0>cs1>cs2>cs3>cs4>cs5>excs).
tmp19a64c1d tmp19a64 (rev1.1) 9-10 7 6 5 4 3 2 1 0 b01cs bit symbol b0om b0bus b0w (ffffe480h) read/write r/w r r/w r/w after reset 0 0 0 0 0 1 0 1 function select the chip selector output waveform. 00: rom/ram do not make any other settings. select data bus width. 0: 16bit 1: 8bit specify the number of waits. (automatic wait insertion) 0000: 0wait 0001: 1wait 0010: 2wait 0011: 3wait 0100: 4wait 0101: 5wait 0110: 6wait 0111: 7wait (external wait input) 1010: (2 + 2n) wait 1011: (3 + 2n) wait 1100: (4 + 2n) wait 1101: (5 + 2n) wait 1110: (6 + 2n) wait 1111: (7 + 2n) wait 1000,1001: reserved 15 14 13 12 11 10 9 8 bit symbol b0cscv b0wcv b0e b0rcv read/write r r/w r/w r/w r r/w after reset 0 0 0 0 0 0 0 0 function specify the number of dummy cycles to be inserted. (cs0 recovery time) 1: 1 cycle 0: none specify the number of dummy cycles to be inserted. (write, recovery time) 00: 2 cycles 01: 1 cycle 10: none 11: setting prohibited enable or disable cs0. 0: disable 1: enable specify the number of dummy cycles to be inserted. (read, recovery time) 00: 2 cycles 01: 1 cycle 10: none 11: setting prohibited 23 22 21 20 19 18 17 16 bit symbol b1om b1bus b1w read/write r/w r r/w r/w after reset 0 0 0 0 0 1 0 1 function select the chip selector output waveform. 00: rom/ram do not make any other settings. select data bus width. 0: 16bit 1: 8bit specify the number of waits. (automatic wait insertion) 0000: 0wait 0001: 1wait 0010: 2wait 0011: 3wait 0100: 4wait 0101: 5wait 0110: 6wait 0111: 7wait (external wait input) 1010: (2 + 2n) wait 1011: (3 + 2n) wait 1100: (4 + 2n) wait 1101: (5 + 2n) wait 1110: (6 + 2n) wait 1111: (7 + 2n) wait 1000,1001: reserved 31 30 29 28 27 26 25 24 bit symbol b1cscv b1wcv b1e b1rcv read/write r r/w r/w r/w r r/w after reset 0 0 0 0 0 0 0 0 function specify the number of dummy cycles to be inserted. (cs1 recovery time) 1: 1 cycle 0: none specify the number of dummy cycles to be inserted. (write, recovery time) 00: 2 cycles 01: 1 cycle 10: none 11: setting prohibited enable or disable cs1. 0: disable 1: enable specify the number of dummy cycles to be inserted. (read, recovery time) 00: 2 cycles 01: 1 cycle 10: none 11: setting prohibited fig. 9.2.1 chip selector and wait controller registers
tmp19a64c1d tmp19a64 (rev1.1) 9-11 7 6 5 4 3 2 1 0 b23cs bit symbol b2om b2bus b2w (0xffff_e484h) read/write r/w r r/w r/w after reset 0 0 0 0 0 1 0 1 function select the chip selector output waveform. 00: rom/ram do not make any other settings. select data bus width. 0: 16bit 1: 8bit specify the number of waits. (automatic wait insertion) 0000: 0wait 0001: 1wait 0010: 2wait 0011: 3wait 0100: 4wait 0101: 5wait 0110: 6wait 0111: 7wait (external wait input) 1010: (2 + 2n) wait 1011: (3 + 2n) wait 1100: (4 + 2n) wait 1101: (5 + 2n) wait 1110: (6 + 2n) wait 1111: (7 + 2n) wait 1000,1001: reserved 15 14 13 12 11 10 9 8 bit symbol b2cscv b2wcv b2e b2m b2rcv read/write r r/w r/w r/w after reset 0 0 0 0 1 0 0 0 function specify the number of dummy cycles to be inserted. (cs2 recovery time) 1: 1 cycle 0: none specify the number of dummy cycles to be inserted. (write, recovery time) 00: 2 cycles 01: 1 cycle 10: none 11: setting prohibited enable or disable cs2. 0: disable 1: enable select cs2 space. 0: 4g space 1: cs space specify the number of dummy cycles to be inserted. (read, recovery time) 00: 2 cycles 01: 1 cycle 10: none 11: setting prohibited 23 22 21 20 19 18 17 16 bit symbol b3om b3bus b3w read/write r/w r r/w r/w after reset 0 0 0 0 0 1 0 1 function select the chip select output waveform. 00: rom/ram do not make any other settings. select data bus width. 0: 16bit 1: 8bit specify the number of waits. (automatic wait insertion) 0000: 0wait 0001: 1wait 0010: 2wait 0011: 3wait 0100: 4wait 0101: 5wait 0110: 6wait 0111: 7wait (external wait input) 1010: (2 + 2n) wait 1011: (3 + 2n) wait 1100: (4 + 2n) wait 1101: (5 + 2n) wait 1110: (6 + 2n) wait 1111: (7 + 2n) wait 1000,1001: reserved 31 30 29 28 27 26 25 24 bit symbol b3cscv b3wcv b3e b3rcv read/write r r/w r/w r/w r r/w after reset 0 0 0 0 0 0 0 0 function specify the number of dummy cycles to be inserted. (cs3 recovery time) 1: 1 cycle 0: none specify the number of dummy cycles to be inserted. (write, recovery time) 00: 2 cycles 01: 1 cycle 10: none 11: setting prohibited enable or disable cs3. 0: disable 1: enable specify the number of dummy cycles to be inserted. (read, recovery time) 00: 2 cycles 01: 1 cycle 10: none 11: setting prohibited fig. 9.2.2 chip selector an d wait controller registers
tmp19a64c1d tmp19a64 (rev1.1) 9-12 7 6 5 4 3 2 1 0 b45cs bit symbol b4om b4bus b4w (0xffff_e488h) read/write r/w r r/w r/w after reset 0 0 0 0 0 1 0 1 function select the chip selector output waveform. 00: rom/ram do not make any other settings. select data bus width. 0: 16bit 1: 8bit specify the number of waits. (automatic wait insertion) 0000: 0wait 0001: 1wait 0010: 2wait 0011: 3wait 0100: 4wait 0101: 5wait 0110: 6wait 0111: 7wait (external wait input) 1010: (2 + 2n) wait 1011: (3 + 2n) wait 1100: (4 + 2n) wait 1101: (5 + 2n) wait 1110: (6 + 2n) wait 1111: (7 + 2n) wait 1000,1001: reserved 15 14 13 12 11 10 9 8 bit symbol b4cscv b4wcv b4e b4rcv read/write r r/w r/w r/w r r/w after reset 0 0 0 0 1 0 0 0 function specify the number of dummy cycles to be inserted. (cs4 recovery time) 1: 1 cycle 0: none specify the number of dummy cycles to be inserted. (write, recovery time) 00: 2 cycles 01: 1 cycle 10: none 11: setting prohibited enable or disable cs4. 0: disable 1: enable specify the number of dummy cycles to be inserted. (read, recovery time) 00: 2 cycles 01: 1 cycle 10: none 11: setting prohibited 23 22 21 20 19 18 17 16 bit symbol b5om b5bus b5w read/write r/w r r/w r/w after reset 0 0 0 0 0 1 0 1 function select the chip select output waveform. 00: rom/ram do not make any other settings. select data bus width. 0: 16bit 1: 8bit specify the number of waits. (automatic wait insertion) 0000: 0wait 0001: 1wait 0010: 2wait 0011: 3wait 0100: 4wait 0101: 5wait 0110: 6wait 0111: 7wait (external wait input) 1010: (2 + 2n) wait 1011: (3 + 2n) wait 1100: (4 + 2n) wait 1101: (5 + 2n) wait 1110: (6 + 2n) wait 1111: (7 + 2n) wait 1000,1001: reserved 31 30 29 28 27 26 25 24 bit symbol b5cscv b5wcv b5e b5rcv read/write r r/w r/w r/w r r/w after reset 0 0 0 0 0 0 0 0 function specify the number of dummy cycles to be inserted. (cs5 recovery time) 1: 1 cycle 0: none specify the number of dummy cycles to be inserted. (write, recovery time) 00: 2 cycles 01: 1 cycle 10: none 11: setting prohibited enable or disable cs5. 0: disable 1: enable specify the number of dummy cycles to be inserted. (read, recovery time) 00: 2 cycles 01: 1 cycle 10: none 11: setting prohibited fig. 9.2.3 chip selector and wait controller registers
tmp19a64c1d tmp19a64 (rev1.1) 9-13 7 6 5 4 3 2 1 0 bexcs bit symbol bexom bexbus bexw (0xffff_e48ch) read/write r/w r r/w r/w after reset 0 0 0 0 0 1 0 1 function select the chip selector output waveform. 00: rom/ram do not make any other settings. select data bus width. 0: 16bit 1: 8bit specify the number of waits. (automatic wait insertion) 0000: 0wait 0001: 1wait 0010: 2wait 0011: 3wait 0100: 4wait 0101: 5wait 0110: 6wait 0111: 7wait (external wait input) 1010: (2 + 2n) wait 1011: (3 + 2n) wait 1100: (4 + 2n) wait 1101: (5 + 2n) wait 1110: (6 + 2n) wait 1111: (7 + 2n) wait 1000,1001: reserved 15 14 13 12 11 10 9 8 bit symbol becscv bexwcv bexrcv read/write r r/w r/w r/w r r/w after reset 0 0 0 0 0 0 0 0 function specify the number of dummy cycles to be inserted. 1: 1 cycle 0: none specify the number of dummy cycles to be inserted. (write, recovery time) 00: 2 cycles 01: 1 cycle 10: none 11: setting prohibited specify the number of dummy cycles to be inserted. (read, recovery time) 00: 2 cycles 01: 1 cycle 10: none 11: setting prohibited 23 22 21 20 19 18 bit symbol read/write r after reset 0 0 0 0 0 0 0 0 function 31 30 29 28 27 26 25 24 bit symbol read/write r r/w r after reset 0 0 0 0 0 0 0 0 function fig. 9.2.4 chip selector and wait controller registers a reset of the tmp19a64 allows the port 4 controller register (p4cr) and the port 4 function register (p4fc) to be cleared to "0," and the cs signal output is disabled. to output the cs signals, set the corresponding bits to "1" at the p4fc and the p4cr in that order. the cs recovery time can be configured in any other areas than th e cs setting areas, but cs si gnals will not be output.
tmp19a64c1d tmp19a64(rev1.1)-10-1 10. dma controller (dmac) the tmp19a64 has a built-in 8-channel dma controller (dmac). 10.1 features the dmac of the tmp19a64 has the following features: (1) dma with 8 independent channels (2) two types of requests for bus control authority: with and without snoop requests (3) transfer requests: internal requ ests (software initiated)/external requests (external interrupts, interrupt requests given by internal peripheral i/os, and requests given by the dreq pin) requests given by the dreq pin (ch2, 3): level mode (memory memory) edge mode (memory i/o, i/o to memory) (4) transfer mode: dual address mode (5) transfer devices: memory-to-memory, memory-to-i/o, i/o-to-memory (6) device size: 32-bit memory (8 or 16 bits can be specified using the cs/wait controller); i/o of 8, 16 or 32 bits (7) address changes: increase, decrease, fi xed, irregular increase, irregular decrease (8) channel priority: fixed (in ascending order of channel numbers) (9) endian switchover function
tmp19a64c1d tmp19a64(rev1.1)-10-2 10.2 configuration 10.2.1 internal connections of the tmp19a64 fig. 10.2.1 shows the internal connections with the dmac in the tmp19a64. (note) in fig. 10.1, signals indi cated by * are internal signals. fig. 10.2.1 dmac connections in the tmp19a64 the dmac has eight dma channels. each of these ch annels handles the data transfer request signal (intdreqn) from the interrupt controller and the acknowledgment signal (dackn) generated in response to intdreqn, where "n" is a channel number from 0 to 7. external pins (dreq2 and dreq3) are internally wired to allow them to function as pins of the port f and j. to use them as pins of the port f and j, they must be selected by setting the function control register pffc and pjfc to an appropriate setting. if both ports are set to use the dmac function, the port f is given priority in using the dmac function. pins, dack2 and dack3, handle the data transfer request and acknowledge signal output supplied through external pins, dreq2 and dreq3. channel 0 is given higher priority than channel 1, channel 1 higher priority than channel 2 and channel 2 higher priority than channel 3. subsequent channels are given priority in the same manner. the tx19a processor core has a snoop function. using the snoop function, the tx19a processor core opens the core's data bus to the dmac, thus allowing the dmac to access the internal rom and ram linked to the core. the dmac is capable of determining whether or not to use this snoop function. for further information on the snoop function, refer to 10.2.3 "snoop function." two types of bus control authority (sreq and greq ) are available to the dmac and which type of control right to use depends on the use or nonuse of the snoop function. greq is a request for bus control authority if the dmac does not use the snoop function, while sreq is a request for bus control authority if the dmac uses the snoop function. sreq is given higher priority than greq. tx19a processor core address data notification to release bus control authority control request for bus control authority request to release bus control authority busgnt * busrel * intdreq [7 : 0]* dack [7 : 0]* dmac notification of bus control authority ownership haveit * interrupt controller (external request) internal i/o interrupt request external interrupt request busreq * dreq [3 : 2] dack [3 : 2] port f and j function control
tmp19a64c1d tmp19a64(rev1.1)-10-3 10.2.2 dmac internal blocks fig. 10.2.2 shows the internal blocks of the dmac. channel 3 channel 2 destination address register (darx) source address register (sarx) byte count register (bsrx) channel control register (ccrx) 31 0 channel 0 dma control register (dcr) data holding register (dhr) channel status register (csrx) dma transfer control register (dtcrx) request select register (rsr) (x 0 through 7) channel 4 channel 5 channel 6 channel 7 channel 1 fig. 10.2.2 dmac internal blocks 10.2.3 snoop function the tx19a processor core has a snoop function. if the snoop function is activated, the tx19a processor core opens the core's data bus to the dmac and su spends its own operation until the dmac withdraws a request for bus control authority. if the snoop functio n is enabled, the dmac can access the internal ram and rom and therefore desi gnate the ram or rom as a source or destination. if the snoop function is not used, the dmac cannot acce ss the internal ram or ro m. however, the g-bus is opened to the dmac. if the tx19a processor core attempts to access memory or the i/o by way of the g-bus and if the dmac does not accept a bus control release request, bus operations cannot be executed and, as a result, the pipeline stalls. (note) if the snoop function is not used, the tx19a processor core does not open the data bus to the dmac. if the data bus is closed and the internal ram or rom is designated as a dmac source or destination, an acknowledgment signal will not be returned in response to a dmac transfer bus cycle and, as a result, the bus will lock.
tmp19a64c1d tmp19a64(rev1.1)-10-4 10.3 registers the dmac has fifty-one 32-bit registers. table 10.3.1 shows the register map of the dmac. table 10.3.1 dmac registers address register symbol register name 0xffff_e200 ccr0 channel cont rol register (ch. 0) 0xffff_e204 csr0 channel st atus register (ch. 0) 0xffff_e208 sar0 source address register (ch. 0) 0xffff_e20c dar0 destination address register (ch. 0) 0xffff_e210 bcr0 byte count register (ch. 0) 0xffff_e218 dtcr0 dma transfer control register (ch. 0) 0xffff_e220 ccr1 channel cont rol register (ch. 1) 0xffff_e224 csr1 channel st atus register (ch. 1) 0xffff_e228 sar1 source address register (ch. 1) 0xffff_e22c dar1 destination address register (ch. 1) 0xffff_e230 bcr1 byte count register (ch. 1) 0xffff_e238 dtcr1 dma transfer control register (ch. 1) 0xffff_e240 ccr2 channel cont rol register (ch. 2) 0xffff_e244 csr2 channel st atus register (ch. 2) 0xffff_e248 sar2 source address register (ch. 2) 0xffff_e24c dar2 destination address register (ch. 2) 0xffff_e250 bcr2 byte count register (ch. 2) 0xffff_e258 dtcr2 dma transfer control register (ch. 2) 0xffff_e260 ccr3 channel cont rol register (ch. 3) 0xffff_e264 csr3 channel st atus register (ch. 3) 0xffff_e268 sar3 source address register (ch. 3) 0xffff_e26c dar3 destination address register (ch. 3) 0xffff_e270 bcr3 byte count register (ch. 3) 0xffff_e278 dtcr3 dma transfer control register (ch. 3) 0xffff_e280 ccr4 channel cont rol register (ch. 4) 0xffff_e284 csr4 channel st atus register (ch. 4) 0xffff_e288 sar4 source address register (ch. 4) 0xffff_e28c dar4 destination address register (ch. 4) 0xffff_e290 bcr4 byte count register (ch. 4) 0xffff_e298 dtcr4 dma transfer control register (ch. 4) 0xffff_e2a0 ccr5 channel c ontrol register (ch. 5) 0xffff_e2a4 csr5 channel st atus register (ch. 5) 0xffff_e2a8 sar5 source address register (ch. 5) 0xffff_e2ac dar5 destination address register (ch. 5) 0xffff_e2b0 bcr5 byte count register (ch. 5) 0xffff_e2b8 dtcr5 dma transfer control register (ch. 5) 0xffff_e2c0 ccr6 channel control register (ch. 6) 0xffff_e2c4 csr6 channel status register (ch. 6) 0xffff_e2c8 sar6 source address register (ch. 6) 0xffff_e2cc dar6 destination a ddress register (ch. 6) 0xffff_e2d0 bcr6 byte count register (ch. 6) 0xffff_e2d8 dtcr6 dma transfer control register (ch. 6)
tmp19a64c1d tmp19a64(rev1.1)-10-5 table 10.3.1 dmac registers (2) 0xffff_e2e0 ccr7 channel control register (ch. 7) 0xffff_e2e4 csr7 channel status register (ch. 7) 0xffff_e2e8 sar7 source address register (ch. 7) 0xffff_e2ec dar7 destination address register (ch. 7) 0xffff_e2f0 bcr7 byte count register (ch. 7) 0xffff_e2f8 dtcr7 dma transfer control register (ch. 7) 0xffff_e300 dcr dma control register (dmac) 0xffff_e304 rsr request se lect register (dmac) 0xffff_e30c dhr data holding register (dmac)
tmp19a64c1d tmp19a64(rev1.1)-10-6 10.3.1 dma control register (dcr) 7 6 5 4 3 2 1 0 dcr bit symbol rst7 rst6 rst5 rst4 rst3 rst2 rst1 rst0 (0xffff_e300h) read/write w after reset 0 0 0 0 0 0 0 0 function see detailed description. 15 14 13 12 11 10 9 8 bit symbol read/write r after reset 0 function 23 22 21 20 19 18 17 16 bit symbol read/write r after reset 0 function 31 30 29 28 27 26 25 24 bit symbol rstall read/write w r after reset 0 0 function see detailed description. bit mnemonic field name description 31 rstall reset all performs a software reset of the dmac. if the rstall bit is set to 1, the values of all the internal registers of the dmac are reset to their initial values. all transfer requests are canceled and all eight channels go into an idle state. 0: don't care 1: initializes the dmac 7 rst7 reset 7 performs a software reset of th e dmac channel 7. if the rst7 bit is set to 1, internal registers of the dmac channel 7 and a corresponding bit of the channel 7 of the rsr register are reset to their initial values. the transfer request of the channel 7 is canceled and the channel 7 goes into an idle state. 0: don't care 1: initializes the dmac channel 7 6 rst6 reset 6 performs a software reset of th e dmac channel 6. if the rst6 bit is set to 1, internal registers of the dmac channel 6 and a corresponding bit of the channel 6 of the rsr register are reset to their initial values. the transfer request of the channel 6 is canceled and the channel 6 goes into an idle state. 0: don't care 1: initializes the dmac channel 6 5 rst5 reset 5 performs a software reset of th e dmac channel 5. if the rst5 bit is set to 1, internal registers of the dmac channel 5 and a corresponding bit of the channel 5 of the rsr register are reset to their initial values. the transfer request of the channel 5 is canceled and the channel 5 goes into an idle state. 0: don't care 1: initializes the dmac channel 5 fig. 10.3.1 dma control register (dcr) (1 of 2)
tmp19a64c1d tmp19a64(rev1.1)-10-7 bit mnemonic field name description 4 rst4 reset 4 performs a software reset of th e dmac channel 4. if the rst4 bit is set to 1, internal registers of the dmac channel 4 and a corresponding bit of the channel 4 of the rsr register are reset to their initial values. the transfer request of the channel 4 is canceled and the channel 4 goes into an idle state. 0: don't care 1: initializes the dmac channel 4 3 rst3 reset 3 performs a software reset of th e dmac channel 3. if the rst3 bit is set to 1, internal registers of the dmac channel 3 and a corresponding bit of the channel 3 of the rsr register are reset to their initial values. the transfer request of the channel 3 is canceled and the channel 3 goes into an idle state. 0: don't care 1: initializes the dmac channel 3 2 rst2 reset 2 performs a software reset of th e dmac channel 2. if the rst2 bit is set to 1, internal registers of the dmac channel 2 and a corresponding bit of the channel 2 of the rsr register are reset to their initial values. the transfer request of the channel 2 is canceled and the channel 2 goes into an idle state. 0: don't care 1: initializes the dmac channel 2 1 rst1 reset 1 performs a software reset of th e dmac channel 1. if the rst1 bit is set to 1, internal registers of the dmac channel 1 and a corresponding bit of the channel 1 of the rsr register are reset to their initial values. the transfer request of the channel 1 is canceled and the channel 1 goes into an idle state. 0: don't care 1: initializes the dmac channel 1 0 rst0 reset 0 performs a software reset of th e dmac channel 0. if the rst0 bit is set to 1, internal registers of the dmac channel 0 and a corresponding bit of the channel 0 of the rsr register are reset to their initial values. the transfer request of the channel 0 is canceled and the channel 0 goes into an idle state. 0: don't care 1: initializes the dmac channel 0 fig. 10.3.1 dma control register (dcr) (2 of 2) (note 1) if a write to the dcr register occurs duri ng a software reset right after the last round of dma transfer is completed, the interrupt to stop dma transfer is not canceled although the channel register is initialized. (note 2) an attempt to execute a write (software reset) to the dcr register by dma transfer must be strictly avoided.
tmp19a64c1d tmp19a64(rev1.1)-10-8 10.3.2 channel control registers (ccrn) (n=0 through 7) 7 6 5 4 3 2 1 0 ccrn bit symbol sac dio dac trsiz dps (0xffff_e200h) read/write r/w r/w r/w r/w r/w (0xffff_e220h) after reset 0 0 0 0 0 0 0 0 (0xffff_e240h) function see detailed description. (0xffff_e260h) 15 14 13 12 11 10 9 8 (0xffff_e280h) bit symbol exr pose lev sreq relen sio sac (0xffff_e2a0h) read/write w r/w r/w r/w r/w r/w r/w r/w (0xffff_e2c0h) after reset 0 0 0 0 0 0 0 0 (0xffff_e2e0h) function always set this bit to "0." see detailed description. 23 22 21 20 19 18 17 16 bit symbol nien ablen big read/write r/w r/w r/w r/w r/w r/w r/w w after reset 1 1 1 0 0 0 1 0 function see detailed description. always set this bit to "0." see detailed description. always set this bit to "0." 31 30 29 28 27 26 25 24 bit symbol str read/write w w after reset 0 0 0 0 0 0 0 0 function see detailed description. always set this bit to "0." bit mnemonic field name description 31 str channel start start (initial value: 0) starts channel operation. if this bit is set to 1, the channel goes into a standby mode and starts to transfer data in response to a transfer request. only a write of 1 is valid to the str bit and a write of 0 is ignored. a read always returns a 0. 1: starts channel operation 24 ? (reserved) this is a reserved bi t. always set this bit to "0." 23 nien normal completion interrupt enable normal completion interrupt enable (initial value: 1) 1: normal completion interrupt enable 0: normal completion interrupt disable 22 abien abnormal completion interrupt enable abnormal completion interrupt enable (initial value: 1) 1: abnormal completion interrupt enable 0: abnormal completion interrupt disable 21 ? (reserved) this is a reserved bit. alth ough its initial value is "1," always set this bit to "0." 20 ? (reserved) this is a reserved bi t. always set this bit to "0." 19 ? (reserved) this is a reserved bi t. always set this bit to "0." 18 ? (reserved) this is a reserved bi t. always set this bit to "0." fig. 10.3.2 channel control r egister (ccrn) (1 of 3)
tmp19a64c1d tmp19a64(rev1.1)-10-9 bit mnemonic field name description 17 big big-endian big endian (initial value: 1) 1: a channel operates by big-endian 0: a channel operates by little-endian 16 ? (reserved) this is a reserved bi t. always set this bit to "0." 15 ? (reserved) this is a reserved bi t. always set this bit to "0." 14 exr external request mode external request mode (initial value: 0) selects a transfer request mode. 1: external transfer request (interr upt request or external dreqn request) 0: internal transfer request (software initiated) 13 pose positive edge positive edge (initial value: 0) the effective level of the transfer request signal intdreqn or dreqn is specified. this function is valid only if the transfer request is an external transfer request (if the exr bit is 1). if it is an internal transfer request (if the exr bit is 0), the pose value is ignored. because the intdreqn and dreqn signals are active at "l" level, ma ke sure that this pose bit is set to "0." 1: setting prohibited 0: the falling edge of the intdreqn or dreqn signal or the "l" level is effective. the dackn is active at "l" level. 12 lev level mode level m ode (initial value: 0) specifies which is used to recognize the external transfer request, signal level or signal change. this setting is valid only if a transfer request is the external transfer request (if the exr bit is 1). if the internal transfer request is specified as a transfer request (if the exr bit is 0), the value of the lev bit is ignored. because th e intdreqn signal is active at "l" level, make sure that you set the lev bit to "1." the state of active dreqn is determined by the lev bit setting. 1: level mode the level of the dreqn signal is recogn ized as a data transfer request. (the "l" level is recognized if the pose bit is 0. 0: edge mode a change in the dreqn signal is recognized as a data transfer request. (a falling edge is recognized if the pose bit is 0.) 11 sreq snoop request snoop reque st (initial value: 0) the use of the snoop function is specified by asserting the bus control request mode. if the snoop function is used, the snoop function of the tx19a processor core is enabled and the dmac can use the data bus of the tx19a processor core. if the snoop function is not used, the snoop function of the tx19a processor core does not work. 1: use snoop function (sreq) 0: do not use snoop function (greq) 10 relen bus control release request enable release request enable (initial value: 0) acknowledgment of the bus control re lease request made by the tx19a processor core is specified. this function is valid only if greq is generated. if sreq is generated, th e tx19a processor core cannot make a bus control release request and, ther efore, this function cannot be used. 1: the bus control release request is acknowledged if the dmac has control of the bus. if the tx19a processor core issues a bus control release request, the dmac relinqui shes control of the bus to the tx19a processor core during a pause in bus operation. 0: the bus control release request is not acknowledged. 9 sio source i/o source type: i/o (initial value: 0) specifies the source device. 1: i/o device 0: memory fig. 10.3.2 channel contro l register (ccrn) (2/3)
tmp19a64c1d tmp19a64(rev1.1)-10-10 bit mnemonic field name description 8 : 7 sac source address count source a ddress count (initial value: 00) source address count (i nitial value: 00) specifies the manner of change in a source address. 1x: address fixed 01: address decrease 00: address increase 6 dio destination i/o destination type: i/o (initial value: 0) specifies a destination device. 1: i/o device 0: memory 5 : 4 dac destination address count destination address count (initial value: 00) specifies the manner of change in a destination address. 1x: address fixed 01: address decrease 00: address increase 3 : 2 trsiz transfer unit transfer size (initial value: 00) specifies the amount of data to be tr ansferred in response to one transfer request. 11: 8 bits (1 byte) 10: 16 bits (2 bytes) 0x: 32 bits (4 bytes) 1 : 0 dps device port size device port size (initial value: 00) specifies the bus width of an i/o device designated as a source or destination device. 11: 8 bits (1 byte) 10: 16 bits (2 bytes) 0x: 32 bits (4 bytes) fig. 10.3.2 channel contro l register (ccrn) (3/3) (note 1) the ccrn register setting must be completed before the dmac is put into a standby mode. (note 2) when accessing the internal i/o or transferring data by dma in response to the dreq pin request, make sure that you set the transfer unit and the device port size to the same size. (note 3) in executing memory-to-memory data transfer, a value set in dps becomes invalid.
tmp19a64c1d tmp19a64(rev1.1)-10-11 10.3.3 request select register (rsr) 7 6 5 4 3 2 1 0 rsr bit symbol reqs3 reqs2 (0xffff_e304h) read/write r/w r/w r/w r/w r/w r/w r/w r/w after reset 0 0 0 0 0 0 0 0 function always set this bit to "0." see detailed description. always set this bit to "0." 15 14 13 12 11 10 9 8 bit symbol read/write r after reset 0 function 23 22 21 20 19 18 17 16 bit symbol read/write r after reset 0 function 31 30 29 28 27 26 25 24 bit symbol read/write r after reset 0 function bit mnemonic field name description 3 reqs3 request select (ch.3) request select (initial value: 0) selects a source of the external transfer request for the dma channel 3. 1: request made by dreq3 0: request made by the interrupt controller (intc) 2 reqs2 request select (ch.2) request select (initial value: 0) selects a source of the external transfer request for the dma channel 2. 1: request made by dreq2 0: request made by the interrupt controller (intc) fig. 10.3.3 dma control register (rsr) (note) make sure that you write "0" to bits 0, 1 and 4 through 7 of the rsr register.
tmp19a64c1d tmp19a64(rev1.1)-10-12 10.3.4 channel status registers (csrn) (n=0 through 7) 7 6 5 4 3 2 1 0 csrn bit symbol (0xffff_e204h) read/write r r/w r/w r/w (0xffff_e224h) after reset 0 0 0 0 (0xffff_e244h) function always set this bit to "0." (0xffff_e264h) 15 14 13 12 11 10 9 8 (0xffff_e284h) bit symbol (0xffff_e2a4h) read/write r (0xffff_e2c4h) after reset 0 (0xffff_e2e4h) function 23 22 21 20 19 18 17 16 bit symbol nc abc bes bed conf read/write r/w r/w r/w r r r r after reset 0 0 0 0 0 0 0 function see detailed description. always set this bit to "0." see detailed description. 31 30 29 28 27 26 25 24 bit symbol act read/write r r after reset 0 0 function see detailed description. bit mnemonic field name description 31 act channel active channel active (initial value: 0) indicates whether the channel is in a standby mode: 1: in a standby mode 0: not in a standby mode 23 nc normal completion normal completion (initial value: 0) indicates normal completion of cha nnel operation. if an interrupt at normal completion is permitted by the ccr register, the dmac requests an interrupt when the nc bit becomes 1. this setting can be cleared by writing 0 to the nc bit. if a request for an interrupt at normal completion was previously issued, the request is canceled if the nc bit becomes 0. if an attempt is made to set the str bit to 1 when the nc bit is 1, an error occurs. to start the next transfer, the nc bit must be cleared to 0. a write of 1 will be ignored. 1: channel operation has been completed normally. 0: channel operation has not been completed normally fig. 10.3.4 channel status registers (csrn) (1/2)
tmp19a64c1d tmp19a64(rev1.1)-10-13 bit mnemonic field name description 22 abc abnormal completion abnormal completion (initial value: 0) indicates abnormal completion of channel operation. if an interrupt at abnormal completion is permitted by the ccr register, the dmac requests an interrupt when the abc bit becomes 1. this setting can be cleared by writing 0 to the abc bit. if a request for an interrupt at abnormal completion was previously issued, the request is canceled if the abc bit becomes 0. additionally, if the abc bit is cleared to 0, each of the bes, bed and conf bits are cleared to 0. if an attempt is made to set the str bit to 1 when the abc bit is 1, an error occurs. to start the next transfer, the abc bit must be cleared to 0. a write of 1 will be ignored. 1: channel operation has been completed abnormally. 0: channel operation has not been completed abnormally. 21 ? (reserved) this is a reserved bi t. always set this bit to "0." 20 bes source bus error source bu s error (initial value: 0) 1: a bus error has occurred when the source was accessed. 0: a bus error has not occurred when the source was accessed. 19 bed destination bus error destination bus error (initial value: 0) 1: a bus error has occurred when the destination was accessed. 0: a bus error has not occurred when the destination was accessed. 18 conf configuration error confi guration error (initial value: 0) 1: a configuration error has occurred. 0: a configuration error has not occurred. 2 : 0 ? (reserved) these three bits are reserved bits. always set them to "0." fig. 10.3.4 channel status registers (csrn) (2/2)
tmp19a64c1d tmp19a64(rev1.1)-10-14 10.3.5 source address registers (sarn) (n=0 through 7) 7 6 5 4 3 2 1 0 sarn bit symbol saddr7 saddr6 saddr 5 saddr4 saddr3 saddr2 saddr1 saddr0 (0xffff_e208h) read/write r/w (0xffff_e228h) after reset 0 (0xffff_e248h) function see detailed description. (0xffff_e268h) 15 14 13 12 11 10 9 8 (0xffff_e288h) bit symbol saddr15 saddr 14 saddr13 saddr12 saddr11 saddr10 saddr9 saddr8 (0xffff_e2a8h) read/write r/w (0xffff_e2c8h) after reset 0 (0xffff_e2e8h) function see detailed description. 23 22 21 20 19 18 17 16 bit symbol saddr23 saddr22 saddr21 saddr20 saddr19 saddr18 saddr17 saddr16 read/write r/w after reset 0 function see detailed description. 31 30 29 28 27 26 25 24 bit symbol saddr31 saddr30 saddr29 saddr28 saddr27 saddr26 saddr25 saddr24 read/write r/w after reset 0 function see detailed description. bit mnemonic field name description 31 : 0 saddr source address source address (initial value: 0) specifies the address of the source from which data is transferred using a physical address. this address changes according to the sac and trsiz settings of ccrn and the sacm setting of dtcrn. fig. 10.3.5 source address register (sarn)
tmp19a64c1d tmp19a64(rev1.1)-10-15 10.3.6 destination address register (darn) (n=0 through 7) 7 6 5 4 3 2 1 0 darn bit symbol daddr7 daddr6 daddr 5 daddr4 daddr3 daddr2 daddr1 daddr0 (0xffff_e20ch) read/write r/w (0xffff_e22ch) after reset 0 (0xffff_e24ch) function see detailed description. (0xffff_e26ch) 15 14 13 12 11 10 9 8 (0xffff_e28ch) bit symbol daddr15 daddr 14 daddr13 daddr12 daddr11 daddr10 daddr9 daddr8 (0xffff_e2ach) read/write r/w (0xffff_e2cch) after reset 0 (0xffff_e2ech) function see detailed description. 23 22 21 20 19 18 17 16 bit symbol daddr23 daddr22 daddr21 daddr20 daddr19 daddr18 daddr17 daddr16 read/write r/w after reset 0 function see detailed description. 31 30 29 28 27 26 25 24 bit symbol daddr31 daddr30 daddr29 daddr28 daddr27 daddr26 daddr25 daddr24 read/write r/w after reset 0 function see detailed description. bit mnemonic field name description 31 : 0 daddr destination address destin ation address (initial value: 0) specifies the address of the destination to which data is transferred using a physical address. this address changes according to the dac and trsiz settings of ccrn and the dacm setting of dtcrn. fig. 10.3.6 destination address register (darn)
tmp19a64c1d tmp19a64(rev1.1)-10-16 10.3.7 byte count registers (bcrn) (n=0 through 7) 7 6 5 4 3 2 1 0 bcrn bit symbol bc7 bc6 bc5 bc4 bc3 bc2 bc1 bc0 (0xffff_e210h) read/write r/w (0xffff_e230h) after reset 0 (0xffff_e250h) function see detailed description. (0xffff_e270h) 15 14 13 12 11 10 9 8 (0xffff_e290h) bit symbol bc15 bc14 bc13 bc12 bc11 bc10 bc9 bc8 (0xffff_e2b0h) read/write r/w (0xffff_e2d0h) after reset 0 (0xffff_e2f0h) function see detailed description. 23 22 21 20 19 18 17 16 bit symbol bc23 bc22 bc21 bc20 bc19 bc18 bc17 bc16 read/write r/w after reset 0 function see detailed description. 31 30 29 28 27 26 25 24 bit symbol read/write r after reset 0 function bit mnemonic field name description 23 : 0 bc byte count byte count (initial value: 0) specifies the number of bytes of data to be transferred. the address decreases by the number of pieces of data transferred (a value specified by trsiz of ccrn). fig. 10.3.7 byte count register (bcrn)
tmp19a64c1d tmp19a64(rev1.1)-10-17 10.3.8 dma transfer control register (dtcrn) (n=0 through 7) 7 6 5 4 3 2 1 0 dtcrn bit symbol dacm sacm (0xffff_e218h) read/write r r/w r/w (0xffff_e238h) after reset 0 0 0 0 0 0 0 (0xffff_e258h) function see detailed description. see detailed description. (0xffff_e278h) 15 14 13 12 11 10 9 8 (0xffff_e298h) bit symbol (0xffff_e2b8h) read/write r (0xffff_e2d8h) after reset 0 (0xffff_e2f8h) function 23 22 21 20 19 18 17 16 bit symbol read/write r after reset 0 function 31 30 29 28 27 26 25 24 bit symbol read/write r after reset 0 function bit mnemonic field name description 5 : 3 dacm destination address count mode destination address count mode specifies the count mode of the destination address. 000: counting begins from bit 0 001: counting begins from bit 4 010: counting begins from bit 8 011: counting begins from bit 12 100: counting begins from bit 16 101: setting prohibited 110: setting prohibited 111: setting prohibited 2 : 0 sacm source address count mode source address count mode specifies the count mode of the source address. 000: counting begins from bit 0 001: counting begins from bit 4 010: counting begins from bit 8 011: counting begins from bit 12 100: counting begins from bit 16 101: setting prohibited 110: setting prohibited 111: setting prohibited fig. 10.3.8 dma transfer control register (dtcrn)
tmp19a64c1d tmp19a64(rev1.1)-10-18 10.3.9 data holding register (dhr) 7 6 5 4 3 2 1 0 dhr bit symbol dot7 dot6 dot5 dot4 dot3 dot2 dot1 dot0 (0xffff_e30ch) read/write r/w after reset 0 function see detailed description. 15 14 13 12 11 10 9 8 bit symbol dot15 dot14 dot13 dot12 dot11 dot10 dot9 dot8 read/write r/w after reset 0 function see detailed description. 23 22 21 20 19 18 17 16 bit symbol dot23 dot22 dot21 dot20 dot19 dot18 dot17 dot16 read/write r/w after reset 0 function see detailed description. 31 30 29 28 27 26 25 24 bit symbol dot31 dot30 dot29 d ot28 dot27 dot26 dot25 dot24 read/write r/w after reset 0 function see detailed description. bit mnemonic field name description 31 : 0 dot data on transfer data on transfer (initial value: 0) data that is read from the source in a dual-address data transfer mode. fig. 10.3.9 data holding register (dhr)
tmp19a64c1d tmp19a64(rev1.1)-10-19 10.4 functions 10.4.1 overview the dmac is a 32-bit dma controller capable of transferring data in a system using the tx19a processor core at high speeds without routing data via the core. (1) source and destination the dmac handles data transfers from memory to memory and between memory and an i/o device. a device from which data is transferred is called a source device and a device to which data is transferred is called a destination device. both memory and i/o devices can be designated as a source or destination device. the dmac supports data transfers from memory to i/o devices, from i/o devices to memory, and from memory to memory, but not between i/o devices. the differences between memory and i/o devi ces are in the way they are accessed. when accessing an i/o device, the dmac asserts a dack n signal. because there is only one line per channel that carries a dackn signal, the number of i/o devices accessible during data transfer is limited to one. therefore, data cannot be transferred between i/o devices. an interrupt factor can be attached to a transfer request to be sent to the dmac. if an interrupt factor is generated, the interrupt controller (intc) issues a request to the dmac (the tx19a processor core is not notified of the interrupt re quest. for details, see description on interrupts.). the request issued by the intc is cleared by th e dackn signal. therefore, if an i/o device is designated as a device to which data is to be tr ansferred, a request made to the dmac is cleared after completion of the data transfer (transfer of the amount of data specified by trsiz). on the other hand, during memory-to-memory transfers, the dackn signal is asserted only when the number of bytes transferred (value set in the bcrn register) becomes "0." therefore, one transfer request allows data to be transferred successively without a pause. for example, if data is transferre d between a internal i/o and the internal (external) memory of the tmp19a64, a request made by the internal i/o to the dmac is cleared after completion of each data transfer and the transfer operation is always put in a standby mode for the next transfer request if the number of bytes transferred (value set in the bcrn register) does not become "0." therefore, the dma transfer operation continues until the value of the bcrn register becomes "0." (2) bus control arbitration (bus arbitration) in response to a transfer request made inside the dmac, the dmac reques ts the tx19a processor core to arbitrate bus control au thority. when a response signal is returned from the core, the dmac acquires bus control authority and executes a data transfer bus cycle. in acquiring bus control for the dmac, use or nonuse of the data bus of the tx19a processor core can be specified; specifically either snoop mode or non-snoop mode can be specified for each channel by using bit 11 (sreq) of the ccrn register. there are cases in which the tx19a processor core requests the release of bus control authority. whether or not to respond to this request can be specified for each channel by using the bit 10 (relen) of the ccrn register. however, this function can only be used in non-snoop mode (greq). in snoop mode (sreq), the tx19a processor core cannot request the release of bus control and, therefore, this function cannot be used. when there are no more transfer requests , the dmac releases control of the bus.
tmp19a64c1d tmp19a64(rev1.1)-10-20 (note 1) when the dmac is acquiring bus control authority, nmi is put on hold. (note 2) do not bring the tx19a to a halt when the dmac is in operation. (note 3) to put the tx19a into idle (doze) mode when the snoop function is being used, you must first stop the dmac.
tmp19a64c1d tmp19a64(rev1.1)-10-21 (3) transfer request modes two transfer request modes are used for the dmac : an internal transfer request mode and an external transfer request mode. in the internal transfer reques t mode, a transfer request is generated inside the dmac. setting a start bit (str bit of the channel control register ccrn) in the internal register of the dmac to "1" generates a transfer request, and th e dmac starts to transfer data. in the external transfer request mode, after a start bit is set to "1," a transfer request is generated when a transfer request signal intdreqn output by the intc is input, or when a transfer request signal dreqn output by an external device is input. for the dmac, two modes are provided: the level mode in which a transfer request is generate d when the "l" level of the intdreqn signal is detected and a mode in which a transfer request is generated when the falling edge or "l" level of the dreqn signal is detected. (4) address mode for the dmac of the tmp19a64, only one address mode is provided: a dual address mode. a single address mode is not available. in the dual address mode, data can be transferred from memory to memory and between memory and an i/o device. source and destination device addresses are output by the dmac. to access an i/o device, the dmac asserts the dackn signal. in the dual address mode, two bus operations, a read and a write, are executed. data that is read from a source devi ce for transfer is first put into the data holding register (dhr) inside the dmac and then written to a destination device. (5) channel operation the dmac has eight channels (channels 0 through 7). a channel is activated and put into a standby mode by setting a start (str) bit in the channel control register (ccrn) to "1." if a transfer request is generated when a channel is in a standby mode, the dmac acquires bus control authority and transfers data . if there is no transfer reques t, the dmac releases bus control authority and goes into a standby mode. if data transfer has been completed, a channel is put in an idle state. data transfer is completed either norm ally or abnormally (e.g. occurrence of errors). an interrupt signal can be generated upon completion of data transfer. fig. 10.4.1 shows the state tran sitions of channel operation. fig. 10.4.1 channel operation state transition start transfer completed idle wait transfer bus control authority acquired bus control authority not acquired bus control authority not acquired bus control authority acquired
tmp19a64c1d tmp19a64(rev1.1)-10-22 (6) combinations of transfer modes the dmac can transfer data by comb ining each transfer mode as follows: transfer request edge/level address mode transfer devices internal ? memory memory memory memory memory i/o external "l" level (intdreqn) i/o memory "l" level (dreqn) memory memory memory i/o external falling edge (dreqn) dual i/o memory (7) address changes address changes are broadly classified into three ty pes: increases, decreases and fixed. the type of address change can be specified for each source an d destination address by using sac and dac in the ccrn register. for a memory device, an increase, decrease or fixed can be specified. for an i/o device, however, only "fixed" can be specified. if an i/o device is selected as a source or destination device, sac or dac in the ccr n register must be set to "fixed." if address increase or decrease is selected, the bit position for counting can be specified using sacm or dacm in the dtcrn register. to speci fy the bit position for counting a source address, sacm must be used, while dacm must be used to specify the bit position for a destination address. any of the bits 0, 4, 8, 12 and 16 can be specified as the bit position for address counting. if 0 is selected, an address normally increases or decreases. by selecting bits 4, 8, 12 or 16, it is possible to increase or decrease an address irregularly. examples of address changes are shown below. example 1: monotonic increase for a source devi ce and irregular increase for a destination device sac: address increase dac: address increase trsiz: transfer unit 32 bits source address: 0xa000_1000 destination address: 0xb000_0000 sacm: 000 counting to begin from bit 0 of the address counter dacm: 001 counting to begin from bit 4 of the address counter source destination 1st 0xa000_1000 0xb000_0000 2nd 0xa000_1001 0xb000_0010 3rd 0xa000_1002 0xb000_0020 4th 0xa000_1003 0xb000_0030 ? ?
tmp19a64c1d tmp19a64(rev1.1)-10-23 example 2: irregular decrease fo r a source device and monotonic d ecrease for a destination device sac: address decrease dac: address decrease trsiz: transfer unit 16 bits source address: initial value 0xa000_1000 destination address: 0xb000_0000 sacm: 010 counting to begin from bit 8 of the address counter dacm: 000 counting to begin from bit 0 of the address counter source destination 1st 0xa000_1000 0xb000_0000 2nd 0x9fff_ff00 0xafff_fffe 3rd 0x9fff_fe00 0xafff_fffc 4th 0x9fff_fd00 0xafff_fffa ? ? 10.4.2 transfer request for the dmac to transfer data, a transfer request mu st be issued to the dmac. there are two types of transfer request: an in ternal transfer request and an external tr ansfer request. either of these transfer requests can be selected and specified for each channel. whichever is selected, the dmac acquires bus contro l authority and starts to transfer data if the transfer request is generated after the start of channel operation. ? internal transfer request if the str bit of ccr is set to "1" when the exr bit of ccrn is "0," a transfer request is generated immediately. this transfer request is called an internal transfer request. the internal transfer request is valid until the chan nel operation is completed. therefore, data can be transferred continuously if either of two events shown below does not occur: * a transition to a channel of higher priority * a shift of bus control authority to another bus master of higher priority in the case of the internal transfer request, data can only be transferred from memory to memory. ? external transfer request if the exr bit of ccrn is "1," setting the str bit of ccr to "1" allows a channel to go into a standby mode. the intc or an external device then generates the intdreqn or dreqn signal for this channel to notify the dmac of a transfer request, and a transfer request is generated. this transfer request is called an exte rnal transfer request. in the case of the external transfer request, data can be transferred from memory to memory and between memory and an i/o device. the tmp19a64 recognizes the tr ansfer request signal by detecting the "l" level of the intdreqn signal or by detecting the falling edge or "l" level of the dreqn signal. the unit of data to be transferred in response to one transfer request is specified in the trsiz field of ccrn, and 32, 16 or 8 bits can be selected. transfer requests using intdreqn and dreqn are described in detail on the next page.
tmp19a64c1d tmp19a64(rev1.1)-10-24 c a transfer request made by the interrupt controller (intc) a transfer request made by the interrupt cont roller is cleared using the dackn signal. this dackn signal is asserted only if a bus cycle for an i/o device or the number of bytes (value set in the bcrn register) transferred from memory to memory becomes "0." therefore, if data is transferred between memory and an i/o device, the amount of data specified by trsiz is transferred only once because intdreqn is clear ed upon completion of one data transfer from one transfer request. on the other hand, if data is transferred from memory to memory, it can be transferred successively in response to a transfer request because intdreqn is not cleared until the number of bytes transferred (value set in the bcrn register) becomes "0." note that if the dmac acknowle dges an interrupt set in intdreqn and if this interrupt is cleared by the intc before dma transfer begi ns, there is a possibility that dma transfer might be executed once after the interrupt is cleared, depending on the timing. d a transfer request made by an external device external pins (dreq2 and dreq3) are internally wired to allow them to function as pins of the port f and port j. these pins can be sel ected by setting the function control registers pffc and pjfc to an appropriate setting. if both po rts are set to use the dmac function, the port f is given priority in using the dmac function. in the edge mode, the dreqn signal must be d easserted and then asserted for each transfer request to create an effective edge. in the le vel mode, however, successive transfer requests can be recognized by maintaining an effective le vel. in memory-to-memory transfer, only the "l" level mode can be used. in i/o-to-memory transfer, only the falling edge mode can be used. ? level mode in the level mode, the dmac detects the "l" level of the dreqn signal upon the rising of the internal system clock. if it detects the "l" level of the dreqn signal when a channel is in a standby mode, it goes into transfer mode and st arts to transfer data. to use the dreqn signal at an active level, the pose bit (bit 13) of the ccrn register must be set to "0." the dackn signal is active at the "l" level, as in the case of the dreqn signal. if an external circuit asserts the dreqn signal , the dreqn signal must be maintained at the "l" level until the dackn signal is asserted. if the dreqn signal is deasserted before the dackn signal is asserted, a transf er request may not be recognized. if the dreqn signal is not at the "l" level, the dmac judges that there is no transfer request, and starts a transfer operation for other channels or releases bus control authority and goes into a standby mode. the unit of a transfer request is specified in the trsiz field () of the ccrn register.
tmp19a64c1d tmp19a64(rev1.1)-10-25 dreqn a [31:1] dackn transfer data fig. 10.4.2.1 transfer request timing (level mode) ? edge mode in the edge mode, the dmac detects the falling edge of the dreqn signal. if it detects the falling edge of the dreqn signal upon the rising of the internal system clock (the case in which the "l" level is detected upon the rising of the system clock although it was not detected upon the rising of the previous system clock) when a channel is in a standby mode, it judges that there is a transfer re quest, goes into transfer mode, and starts a transfer operation. to detect the falling edge of the dreqn signal, the pose bit (bit 13) of the ccrn register must be set to "0," and the lev bit (bit 12) must also be set to "0." the dackn signal is active at the "l" level. if the falling edge of the dreqn signal is detected after the dackn signal is asserted, the next data is transferred without a pause. if there is no falling edge of the dreqn signal after the dackn signal is asserted, the dmac judges that there is no transfer reque st, and starts a transfer operation for other channels or goes into a standby mode after releasing bus control authority. the unit of a transfer request is specified in the trsiz field () of the ccrn register. dreqn a [31:1] dackn transfer data transfer data fig. 10.4.2.2 transfer request timing (edge mode)
tmp19a64c1d tmp19a64(rev1.1)-10-26 10.4.3 address mode in the address mode, whether the dmac executes data transfers by outputting ad dresses to both source and destination devices or it does by outputting addresses to either a source device or a destination device is specified. the former is called the dual addr ess mode, and the latter is called the single address mode. for tmp19a64, only the dual address mode is available. in the dual address mode, the dmac first performs a read of the source device by storing the data output by the source device in one of its registers (d hr). it then executes a write on the destination device by writing the stored data to the de vice, thereby completing the data transfer. fig. 10.4.3.1 basic concept of data transfer in the dual address mode the unit of data to be transferred by the dmac is the amount of data (32, 16 or 8 bits) specified in the trsiz field of the ccrn. one unit of data is transfer red each time a transfer request is acknowledged. in the dual address mode, the unit of data is read from the source device, put into the dhr and written to the destination device. access to memory takes place when the specified unit of data is transferred. if access to external memory takes place, 16-bit access takes place twice if the unit of data is set to 32 bits and if the bus width set in the cs wait controller is 16 bits. likewise, if the unit of data is set to 32 bits and if the bus width set in the cs wait controller is 8 bits, 8-bit access takes place four times. if data is to be transferred from memory to an i/o device or from an i/o device to memory, the unit of data to be transferred must be specified and, at the same time, the bus width of an i/o device (device port size) must be specified in the dps field of the ccrn (32, 16 or 8 bits). dmac destination device data data bus c address d d c address bus source device
tmp19a64c1d tmp19a64(rev1.1)-10-27 if the unit of data to be transferred is equal to a de vice port size, a read or write is executed once for an i/o device. if a device port size is smaller than the unit of data to be transferred, the dmac performs a read or write for an i/o device more than once. for example, if the unit of data to be transferred is 32 bits and if data is transferred from an i/o device whose device port size is 8 bits to memory, 8 bits of data are read from an i/o device four consecutive times and stored in the dhr. this 32-bit data is then written to memory all at once (twice if the data is written to external memory and if the bus width is 16 bits). an address change occurs by the amount defined as the unit of data to be transferred. the bcrn value also changes by the same amount. a device port size must not be larger than the unit of data to be transferred. the relationships between units of data to be transferred and device port sizes are summarized in table 10.4.3.2. table 10.4.3.2 units of data to be transferred and device port sizes (dual address mode) trsiz dps bus operations performed on i/o device 0x (32 bits) 0x (32 bits) once 0x (32 bits) 10 (16 bits) twice 0x (32 bits) 11 (8 bits) 4 times 10 (16 bits) 0x (32 bi ts) setting prohibited 10 (16 bits) 10 (16 bits) once 10 (16 bits) 11 (8 bits) twice 11 (8 bits) 0x (32 bi ts) setting prohibited 11 (8 bits) 10 (16 bi ts) setting prohibited 11 (8 bits) 11 (8 bits) once
tmp19a64c1d tmp19a64(rev1.1)-10-28 10.4.4 channel operation a channel is activated if the str bit of the ccrn of a channel is set to "1." if a channel is activated, an activation check is conducted and if no error is detected, the channel is put into a standby mode. if a transfer request is generated when a channel is in a standby mode, the dmac acquires bus control authority and starts to transfer data. channel operation is completed either normally or a bnormally (forced termination or occurrence of an error). either normal comple tion or abnormal completion is indicated to the csrn. start of channel operation a channel is activated if the str bit of the ccrn is set to "1." when a channel is activated, a conf iguration error check is conducted and if no error is detected, the channel is put into a standby mode. if an error is detected, the channel is deactivated and this state of completion is considered to be abnormal completion. when a cha nnel goes into a standby mode, the act bit of the csrn of that channel becomes "1." if a channel is programmed to start operation in response to an intern al transfer request, a transfer request is generated immediately and the dmac acquires bus control authority and starts to transfer data. if a channel is programmed to start operation in response to an external transfer request, the dmac acquires bus control authority after intdreqn or dreqn is asserted, and starts to transfer data. completion of channel operation a channel completes operation either normally or abnormally and either one of these states is indicated to the csrn. if an attempt is made to set the str bit of the ccrn register to "1" when the nc or abc bit of the csrn register is "1," channel operation does not start and the completion of operation is considered to be abnormal completion. normal completion channel operation is considered to have been completed normally in the case shown below. for channel operation to be considered to have been completed normally, the transfer of a unit of data (value specified in the trsiz field of ccrn) must be completed successfully. ? when the contents of bcrn become 0 and data transfer is completed abnormal completion cases of abnormal completion of dmac operation are as follows: ? completion due to a configuration error a configuration error occurs if there is a mi stake in the dma transfer setting. because a configuration error occurs before data transfer begins, values specified in sarn, darn and bcrn remain the same as when they were initially specified. if channel operation is completed abnormally due to a configuration error, the abc bit of the csrn is set to "1," along with the conf bit. causes of a configuration error are as follows: ? both sio and dio were set to "1." ? the str bit of ccrn was set to "1" when the nc bit or abc bit of csrn was "1." ? a value that is not an integer multiple of the unit of data was set for bcrn. ? a value that is not an integer multiple of the unit of data was set for sarn or darn. ? a prohibited combination of a device port size and a unit of data to be transferred was set. ? the str bit of ccrn was set to "1" when the bcrn value was "0."
tmp19a64c1d tmp19a64(rev1.1)-10-29 ? completion due to a bus error if the dmac operation has been completed abnormally due to a bus error, the abc bit of csrn is set to "1" and the bes or bed bit of csrn is set to "1." ? a bus error was detected during data transfer. (note) if the dmac operation has been completed abnormally due to a bus error, bcr, sar and dar values cannot be guaranteed. if a bus error persists, refer to 21. "list of functional registers" which appear later in this document. 10.4.5 order of priority of channels concerning the eight channels of the dmac, the smaller the channel number assigned to each channel, the higher the priority. if a transfer request is gene rated to channels 0 and 1 simultaneously, a transfer request for channel 0 is processed with higher pr iority and the transfer operation is performed accordingly. when the transfer request for channel 0 is cleared, the transfer operation for channel 1 is performed if the transfer re quest still exists (an internal transfer reque st is retained if it is not cleared. the interrupt controller retains an external transfer request if the active state for an interrupt request assigned to dma requests in the interrupt controller is set to edge mode. however, the interrupt controller does not retain an external transfer request if the active state is set to level mode. if the active state for an interrupt request assigned to dma requests in the interrupt controller is set to level mode, it is necessary to continue assert ing the interrupt request signal). if a transfer request is generated when data is being transferred through channel 1, a channel transition occurs at channel 0, that is, data transfer through channel 1 is temporarily suspended and data transfer through channel 0 is started. when the transfer request for channel 0 is cleared, data transfer through channel 1 resumes. channel transitions occur upon the completion of data transfers (when the writin g of all data in the dhr has been completed). interrupts upon completion of a channel operation, the dmac can generate interrupt requests (intdman: dma transfer completion interrupt) to the tx19a processor core with two types of interrupts available: a normal completion interrupt and an abnormal completion interrupt. ? normal completion interrupt if a channel operation is completed normally, the nc bit of csrn is set to "1." if a normal completion interrupt is authorized for the ni en bit of the ccrn, the dmac requests the tx19a processor core to authorize an interrupt. ? abnormal completion interrupt if a channel operation is completed abnormally, the abc bit of csrn is set to "1." if an abnormal completion interrupt is authorized for the abien bit of the ccrn, the dmac requests the tx19a processor core to authorize an interrupt.
tmp19a64c1d tmp19a64(rev1.1)-10-30 10.5 timing diagrams dmac operations are synchronous to the rising edges of the internal system clock. 10.5.1 dual address mode ? memory-to-memory transfer fig. 10.5.1.1 shows an example of the timing with which 16-bit data is transferred from one external memory (16-bit width) to another (16-bit width). data is actually transferred successively until bcrn becomes "0." tsys /rd /cs0 a[23:0] d[15:0] /cs1 /wr,/hwr ` data data fig. 10.5.1.1 dual address mode (memory-to-memory) ? memory-to-i/o device transfer fig. 10.5.1.2 shows an example of the timing w ith which data is transferred from memory to an i/o device if the unit of data to be transferred is set to 16 bits and if the device port size is set to 8 bits. tsys data a[23:0] /cs0 /cs1 /rd /wr d[15:0] data data ` fig. 10.5.1.2 dual address mode (memory-to-i/o device) read write read write write
tmp19a64c1d tmp19a64(rev1.1)-10-31 ? i/o device-to-memory transfer fig. 10.5.1.3 shows an example of the timing with which data is transferred from an i/o device to memory if the unit of data to be transferred is set to 16 bits and if the device port size is set to 8 bits. tsys data ` ` data d[15:0] data /wr /cs1 /rd /cs0 a[23:0] fig. 10.5.1.3 dual address mode (i/o device-to-memory) read read write
tmp19a64c1d tmp19a64(rev1.1)-10-32 10.5.2 dreqn-initiated transfer mode ? data transfer from internal ra m to external memory (multiplexed bus, 5-wait insertion, level mode) fig. 10.5.2.1 shows two timing cycles in which 16-bit data is transferred twice from internal ram to external memory (16-bit width). (7+)? 5 ???? add ad[15:0] /rd add /dreqn /dackn a[23:16] /csn ale /wr /hwr r/w_ add data data fig. 10.5.2.1 level mode (from inte rnal ram to external memory) ? data transfer from external memory to intern al ram (multiplexed bus, 5-wait insertion, level mode) fig. 10.5.2.2 shows two timing cycles in which 16-bit data is transferred twice from external memory (16-bit width) to internal ram. (7+)? 5 ???? /csn r/w_ /dreqn /dackn ale a[23:16] /rd /wr ad[15:0] add /hwr add data add data fig. 10.5.2.2 level mode (from exte rnal memory to internal ram) internal system clock (7+ ) clock 5 waits internal system clock (7+ ) clock 5 waits
tmp19a64c1d tmp19a64(rev1.1)-10-33 ? data transfer from internal ram to external memory (separate bus, 5-wait insertion, level mode) fig. 10.5.2.3 shows two timing cycles in which 16-bit data is transferred twice from internal ram to external memory (16-bit width). (7+)? 5 ???? /dreqn /dackn /hwr r/w_ /wr a[23:0] d[15:0] /rd /csn fig. 10.5.2.3 level mode (inter nal ram to external memory) ? data transfer from external memory to inte rnal ram (separate bus, 5-wait insertion, level mode) fig. 10.5.2.4 shows two timing cycles in which 16-bit data is transferred twice from external memory (16-bid width) to internal ram. (7+)? 5 ???? /dreqn /dackn a[23:0] d[15:0] /rd /wr /hwr /csn r/w_ fig. 10.5.2.4 level mode (from exte rnal memory to internal ram) internal system clock (7+ ) clock 5 waits internal system clock (7+ ) clock 5 waits
tmp19a64c1d tmp19a64(rev1.1)-10-34 ? data transfer from internal ra m to external memory (multiplexed bus, 5-wait insertion, edge mode) fig. 10.5.2.5 shows one timing cycle in which 16-bit data is transferred once from internal ram to external memory (16-bit width). (7+)? 5 ???? ad[15:0] /csn r/w_ /rd /wr /hwr a[23:16] /dreqn /dackn ale add add data fig. 10.5.2.5 edge mode (from inte rnal ram to external memory) ? data transfer from external memory to intern al ram (multiplexed bus, 5-wait insertion, edge mode) fig. 10.5.2.6 shows one timing cycle in which 16-bit data is transferred once from external memory (16-bit width) to internal ram. (7+)? 5 ???? /dreqn /dackn ale a[23:16] ad[15:0] /csn r/w_ /rd /wr /hwr add add data fig. 10.5.2.6 edge mode (from exte rnal memory to internal ram) internal system clock (7+ ) clock 5 waits internal system clock ( 7+ ) clock 5 waits
tmp19a64c1d tmp19a64(rev1.1)-10-35 ? data transfer from internal ra m to external memory (separat e bus, 5-wait insertion, edge mode) fig. 10.5.2.7 shows one timing cycle in which 16-bit data is transferred once from internal ram to external memory (16-bit width). (7+)? 5 ???? /dreqn /dackn a[23:0] d[15:0] /rd /wr /hwr /csn r/w_ fig. 10.5.2.7 edge mode (from inte rnal ram to external memory) ? data transfer from external memory to intern al ram (separate bus, 5-wait insertion, edge mode) fig. 10.5.2.8 shows one timing cycle in which 16-bit data is transferred once from external memory (16-bit width) to internal ram. (7+)? 5 ???? /dreqn /dackn a[23:0] d[15:0] /rd /wr /hwr /csn r/w_ fig. 10.5.2.8 edge mode (from exte rnal memory to internal ram) internal system clock ( 7+ ) clock 5 waits internal system clock ( 7+ ) clock 5 waits
tmp19a64c1d tmp19a64(rev1.1)-10-36 10.6 case of data transfer the settings described below relate to a case in which serial data received (scnbu f) is transferred to the internal ram by dma transfer. dma (ch.0) is used to transfer data. the dma0 is activated by a receive inte rrupt generated by sio1. ? channel used: 0 ? source address: sc1buf ? destination: (physical address) 0xffff_9800 ? number of bytes transferred: 256 bytes ? data length 8 bits: uart ? serial channel: ch 1 ? transfer rate: 9600 bps imc4 0xxxxx_xx70 /* assigned to dmc0 activation factor * / intclr 0x40 /* ivr [9:4], intrx1 interrupt factor * / sc1mod0 0x29 /* uart mode, 8-bit length, baud rate generator * / sc1cr 0x00 br1cr 0x1f /* @fc=54mhz, transfer rate setting */ dcr 0x8000_0000 /* dma reset * / imce 0xxxxx_xx40 /* disable interrupt setting */ intclr 0xe0 /* ivr [8:0] value * / imce 0xxxxx_xx44 /* level = 4 (any given value) */ dtcr0 0x0000_0000 /* dacm = 000 */ /* sacm = 000 */ sar0 0xffff_f208 /* physical address of sc1buf */ dar0 0xffff_9800 /* physical address of destina tion to which data is transferred */ bcr0 0x0000_00ff /* 256 (number of bytes transferred) / ccr0 0x80c0_5b0f /* dma ch.0 setting */
tmp19a64c1d tmp19a64(rev1.1)-11-1 11. 16-bit timer/event counters (tmrbs) each of the eleven channels (tmrb0 through tmrba) has a multi-functional, 16-bit timer/event counter. tmrbs operate in the followi ng four operation modes: ? 16-bit interval timer mode ? 16-bit event counter mode ? 16-bit programmable square-wave output (ppg) mode ? two-phase pulse input counter mode (quad-speed and tmrba) the use of the capture function allows tmrbs to operate in three other modes: ? frequency measurement mode ? pulse width measurement mode ? time difference measurement mode each channel consists of a 16-bit up-counter, two 16-bit timer registers (one of which is double-buffered), two 16-bit capture registers, two comparators, a capture inpu t control, a timer flip-flop and its associated control circuit. each channel (tmrb0 through tmrba) functions independently and while the channels operate in the same way, there are differences in their specifications as show n in table 11.1 and the two-phase pulse count function. therefore, the operational descriptions here are for tmrb0 only and for the two-phase pulse count function tmrba only.
tmp19a64c1d tmp19a64(rev1.1)-11-2 table 11.1 differences in the s pecifications of tmrb modules channel specification tmrb0 tmrb1 tmrb2 tmrb3 tmrb4 tmrb5 external clock/ capture trigger input pins tb0in0 (shared with pa0) tb0in1 (shared with pa1) tb1in0 (shared with pa3) tb1in1 (shared with pa4) ? ? ? ? external pins timer flip-flop output pin tb0out (shared with pa2) tb1out (shared with pa5) tb2out (shared with pa6) tb3out (shared with pa7) tb4out (shared with pb0) tb5out (shared with pb1) internal signals timer for capture triggers tb9out tb9out tb9out tb9out tb9out tb3out timer run register tb0run tb1run tb2run tb3run tb4run tb5run timer control register tb0cr tb1cr tb2cr tb3 cr tb4cr tb5cr timer mode register tb0mod tb 1mod tb2mod tb3mod tb4mod tb5mod timer flip-flop control register tb0ffcr tb1ffcr tb2ffcr tb3 ffcr tb4ffcr tb5ffcr timer status register tb0st tb1st tb2st tb3st tb4st tb5st timer uc preset register tb0ucl tb0uch tb1ucl tb1uch tb2ucl tb2uch tb3ucl tb3uch tb4ucl tb4uch tb5ucl tb5uch timer register tb0rg0l tb0rg0h tb0rg1l tb0rg1h tb1rg0l tb1rg0h tb1rg1l tb1rg1h tb2rg0l tb2rg0h tb2rg1l tb2rg1h tb3rg0l tb3rg0h tb3rg1l tb3rg1h tb0rg0l tb4rg0h tb4rg1l tb4rg1h tb5rg0l tb5rg0h tb5rg1l tb5rg1h register names capture register tb0cp0l tb0cp0h tb0cp1l tb0cp1h tb1cp0l tb1cp0h tb1cp1l tb1cp1h tb2cp0l tb2cp0h tb2cp1l tb2cp1h tb3cp0l tb3cp0h tb3cp1l tb3cp1h tb4cp0l tb4cp0h tb4cp1l tb4cp1h tb5cp0l tb5cp0h tb5cp1l tb5cp1h channel specification tmrb6 tmrb7 tmrb8 tmrb9 tmrba external clock/ capture trigger input pins ? ? ? ? tbain0 (shared with pb6) tbain1 (shared with pb7) external pins timer flip-flop output pin tb6out (shared with pb2) tb7out (shared with pb3) tb8out (shared with pb4) tb9out (shared with pb5) ? internal signals timer for capture triggers tb3out tb3out tb3out tb3out tb3out timer run register tb6run tb7run tb8run tb9run tbarun timer control register tb6 cr tb7cr tb8cr tb9cr tbacr timer mode register tb6m od tb7mod tb8mod tb9mod tbamod timer flip-flop control register tb6 ffcr tb7ffcr tb8ffcr tb9ffcr tbaffcr timer status register tb6st tb7st tb8st tb9st tbast timer uc preset register tb6ucl tb6uch tb7ucl tb7uch tb8ucl tb8uch tb9ucl tb9uch tbaucl tbauch timer register tb6rg0l tb6rg0h tb6rg1l tb6rg1h tb7rg0l tb7rg0h tb7rg1l tb7rg1h tb8rg0l tb8rg0h tb8rg1l tb8rg1h tb9rg0l tb9rg0h tb9rg1l tb9rg1h tbarg0l tbarg0h tbarg1l tbarg1h register names capture register tb6cp0l tb6cp0h tb6cp1l tb6cp1h tb7cp0l tb7cp0h tb7cp1l tb7cp1h tb8cp0l tb8cp0h tb8cp1l tb8cp1h tb9cp0l tb9cp0h tb9cp1l tb9cp1h tbacp0l tbacp0h tbacp1l tbacp1h
tmp19a64c1d tmp19a64(rev1.1)-11-3 11.1 block diagram of each channel internal data bus internal data bus run/ clear match detection 16-bit comparator (cp0) 16-bit timer register tb0rg0h/l 16-bit comparator (cp1) register buffer 0 16-bit timer register tb0rg1h/l match detection count clock tb0mod tb0run selector tb0mod prescaler clock: t0 captrg tb0in0 tb0in1 t1 t4 t16 tb0run tb0mod capture register 0 tb0cp0h/l tb0mod capture register 1 tb0cp1h/l 16 8 4 2 t4 t16 tb0run internal data bus internal data bus timer flip-flop control tb0ff0 timer flip-flop tb0out tmrb0 interrupt inttb0 timer flip-flop output overflow interrupt output capture control 16-bit up-counter (uc0) 16-bit timer status register tb0st register 0 interrupt register 1 interrupt 32 t1 inttb01 inttb91 inttb00 inttb90 (note) tmrb2 through tmrb9 have no external clock and capture trigger input functions. fig. 11.1.1 tmrb0 block diagram (same for channels 1 through 9)
tmp19a64c1d tmp19a64(rev1.1)-11-4 internal data bus internal data bus run/ clear match detection 16-bit comparaotr (cp0) 16-bit timer register tbarg0h/l 16-bit comparator (cp1) register buffer 0 16-bit timer register tbarg1h/l match detection count clock tbamod tbarun selector tbamod tb a mod capture register 0 tbacp0h/l tbamod capture register 1 tbacp1h/l 16 8 4 2 t4 t16 tbarun internal data bus internal data bus timer flip-flop control tbaff0 timer flip-flop tbaout tmrba interrupt inttba timer flip-flop output overflow interrupt output capture control 16-bit up-and-down counter (uc0) 16-bit timer status register tbast register 0 interrupt output register 1 interrupt output up-and-down control tbarun tmp19a64c1d tmp19a64(rev1.1)-11-5 11.2 description of operations for each circuit 11.2.1 prescaler there is a 5-bit prescal er for acquiring the tmrb0 source clock. the prescaler input clock t0 is fperiph/2, fperiph/4, fperiph/8 or fperiph/16 selected by syscr0 in the cg. the peripheral clock, fperiph, is either fgear, a clock selected by syscr1 in the cg, or fc, which is a clock before it is divided by the clock gear. the operation or the stoppage of a prescaler is set with tb0run where writing "1" starts counting and writing "0" clears and stops counting. ta ble 11.2.1 shows prescaler output clock resolutions.
tmp19a64c1d tmp19a64(rev1.1)-11-6 table 11.2.1 prescaler output clock resolutions @fc = 54mhz prescaler output clock resolutions release peripheral clock clock gear value select prescaler clock t1 t4 t16 00(fperiph/16) fc/2 5 (0.59 s) fc/2 7 (2.37 s) fc/2 9 (9.48 s) 01(fperiph/8) fc/2 4 (0.30 s) fc/2 6 (1.19 s) fc/2 8 (4.74 s) 10(fperiph/4) fc/2 3 (0.15 s) fc/2 5 (0.59 s) fc/2 7 (2.37 s) 000 (fc) 11(fperiph/2) fc/2 2 (0.07 s) fc/2 4 (0.30 s) fc/2 6 (1.19 s) 00(fperiph/16) fc/2 6 (1.19 s) fc/2 8 (4.74 s) fc/2 10 (18.96 s) 01(fperiph/8) fc/2 5 (0.59 s) fc/2 7 (2.37 s) fc/2 9 (9.48 s) 10(fperiph/4) fc/2 4 (0.30 s) fc/2 6 (1.19 s) fc/2 8 (4.74 s) 100 (fc/2) 11(fperiph/2) fc/2 3 (0.15 s) fc/2 5 (0.59 s) fc/2 7 (2.37 s) 00(fperiph/16) fc/2 7 (2.37 s) fc/2 9 (9.48 s) fc/2 11 (37.93 s) 01(fperiph/8) fc/2 6 (1.19 s) fc/2 8 (4.74 s) fc/2 10 (18.96 s) 10(fperiph/4) fc/2 5 (0.59 s) fc/2 7 (2.37 s) fc/2 9 (9.48 s) 110 (fc/4) 11(fperiph/2) fc/2 4 (0.30 s) fc/2 6 (1.19 s) fc/2 8 (4.74 s) 00(fperiph/16) fc/2 8 (4.74 s) fc/2 10 (18.96 s) fc/2 12 (75.85 s) 01(fperiph/8) fc/2 7 (2.37 s) fc/2 9 (9.48 s) fc/2 11 (37.93 s) 10(fperiph/4) fc/2 6 (1.19 s) fc/2 8 (4.74 s) fc/2 10 (18.96 s) 0 (fgear) 111 (fc/8) 11(fperiph/2) fc/2 5 (0.59 s) fc/2 7 (2.37 s) fc/2 9 (9.48 s) 00(fperiph/16) fc/2 5 (0.59 s) fc/2 7 (2.37 s) fc/2 9 (9.48 s) 01(fperiph/8) fc/2 4 (0.30 s) fc/2 6 (1.19 s) fc/2 8 (4.74 s) 10(fperiph/4) fc/2 3 (0.15 s) fc/2 5 (0.59 s) fc/2 7 (2.37 s) 000 (fc) 11(fperiph/2) fc/2 2 (0.07 s) fc/2 4 (0.30 s) fc/2 6 (1.19 s) 00(fperiph/16) fc/2 5 (0.59 s) fc/2 7 (2.37 s) fc/2 9 (9.48 s) 01(fperiph/8) fc/2 4 (0.30 s) fc/2 6 (1.19 s) fc/2 8 (4.74 s) 10(fperiph/4) fc/2 3 (0.15 s) fc/2 5 (0.59 s) fc/2 7 (2.37 s) 100 (fc/2) 11(fperiph/2) ? fc/2 4 (0.30 s) fc/2 6 (1.19 s) 00(fperiph/16) fc/2 5 (0.59 s) fc/2 7 (2.37 s) fc/2 9 (9.48 s) 01(fperiph/8) fc/2 4 (0.30 s) fc/2 6 (1.19 s) fc/2 8 (4.74 s) 10(fperiph/4) ? fc/2 5 (0.59 s) fc/2 7 (2.37 s) 110 (fc/4) 11(fperiph/2) ? fc/2 4 (0.30 s) fc/2 6 (1.19 s) 00(fperiph/16) fc/2 5 (0.59 s) fc/2 7 (2.37 s) fc/2 9 (9.48 s) 01(fperiph/8) ? fc/2 6 (1.19 s) fc/2 8 (4.74 s) 10(fperiph/4) ? fc/2 5 (0.59 s) fc/2 7 (2.37 s) 1 (fc) 111 (fc/8) 11(fperiph/2) ? ? fc/2 6 (1.19 s) (note 1) the prescaler output clock tn must be selected so that tn tmp19a64c1d tmp19a64(rev1.1)-11-7 11.2.2 up-counter (uc0) and up-counter capture registers (tb0ucl, tb0uch) this is the 16-bit binary counter that counts up in response to the input clock specified by tb0mod. uc0 input clock can be selected from either three types - t0, t2 and t8 - of prescaler output clock or the external clock of the tb0in0 pin. for uc0, start, stop and clear are specified by tb0run and if uc0 matches the tb0rg1h/l timer register, it is cl eared to "0" if the setting is "clear enable." clear enable/disable is specified by tb0mod. if the setting is "clear disable," the counter operates as a free-running counter. the current count value of the uc0 can be captured by reading the tb0ucl and tb0uch registers. note make sure that reading is performed in the order of low-order bits followed by high-order bits. if uc0 overflow occurs, the inttb01 overflow interrupt is generated. tmrba have the two-phase pulse input count function. the two-phase pulse count mode is activated by tbarun. this counter serves as the up-a nd-down counter, and is initialized to 0x7fff. if a counter overflow occurs, the initial value 0x0000 is reloaded. if a counter underflow occurs, the initial value 0xffff is reloaded. when the two-phase pulse count mode is not active, the counter counts up only. 11.2.3 timer registers (tb0rg0h/l, tb0rg1h/l) these are 16-bit registers for specify ing counter values and two register s are built into each channel. if a value set on this timer register matches that on a uc0 up-counter, the match detection signal of the comparator becomes active. to write data to the tb0rg0h/l and tb0rg1h/l timer re gisters, either a 2-byte data transfer instruction or a 1-byte data transfer instruction written twice in the order of low-order 8 bits followed by high-order 8 bits can be used. tb0rg0 of this timer register is paired with register buffer 0 - a double-buffered configuration. tb0rg0 uses tb0run to control the enabling/disabling of double buffering so that if = "0," double buffering is disabled and if = "1," it is enabled. if double buffering is enabled, data is transferred from register buffer 0 to the tb0rg0 timer register when there is a match between uc0 and tb0rg1. the values of tb0rg0 and tb0rg1 become undefined after a reset so to use a 16-bit timer, it is necessary to write data to them beforehand. a reset initializes tb0run to "0" and sets double buffering to "disable." to use double buffering, write data to the timer register, set to "1" and then write the following data to the register buffers. tb0rg0 and the register buffers are assigned to the same address: 0xffff_f18a/0xffff_f18b. if = "0," the same value is written to tb0rg0 and each register bu ffer; if = "1," the value is only written to each register buffer. to write an initial value to the timer register, therefore, the register buffers must be set to "disable."
tmp19a64c1d tmp19a64(rev1.1)-11-8 11.2.4 capture registers (tb0cp0h/l, tb0cp1h/l) to read data from the capture register, use 1-byte data transfer instruction twice and make sure that reading is performed in the order of lo w-order bits followed by high-order bits . (don?t use 2-byte transfer instruction for data reading.) 11.2.5 capture this is a circuit that controls the timing of latching values from the uc0 up-counter into the tb0cp0 and tb0cp1 capture registers. the timing with which to latch data is specified by tb0mod . software can also be used to import values from the uc0 up-counter into the capture register; specifically, uc0 values are taken into the tb0cp0 capture regi ster each time "0" is written to tb0mod. to use this capability, the prescaler must be running (tb0run = "1"). in the two-phase pulse count mode (tmrba), the counter value is captured by using software. (note 1) although a read of low-order 8 bits in the capture register suspends the capture operation, it is resumed by successively reading high-order 8 bits. (note 2) if the timer stops after a read of low-order 8 bits, the capture operation remains suspended even after the timer restarts. please ensure that the timer is not stopped after a read of low-order 8 bits. 11.2.6 comparators (cp0, cp1) these are 16-bit comparators for detecting a match by comparing set values of the uc0 up-counter with set values of the tb0rg0 and tb0rg1 timer registers. if a match is detected, inttb0 is generated. 11.2.7 timer flip-flop (tb0ff0) the timer flip-flop (tb0ff0) is reversed by a match signal from the comparator and a latch signal to the capture registers. it can be enab led or disabled to reverse by setting the tb0ffcr. the value of tb0ff0 becomes undefined after a reset. the flip-flop can be reversed by writing "00" to tb0ffcr. it can be set to "1" by wr iting "01," and can be cleared to "0" by writing "10." the value of tb0ff0 can be output to the timer output pin, tb0out (shared with pa2). to enable timer output, the port a related registers pacr and pafc must be programmed beforehand.
tmp19a64c1d tmp19a64(rev1.1)-11-9 11.3 register description tmrbn run register (n=0 through 9) 7 6 5 4 3 2 1 0 bit symbol tbnrde i2tbn tbnpru n tbnrun read/write r/w r/w r/w r/w r/w r/w r r/w after reset 0 0 0 function double buffering 0: disable 1: enable write "0." write "0." write "0." idle 0: stop 1: operate timer run/stop control 0: stop & clear 1: count * the first bit can be read as "0." : controls the tmrbn count operation. : controls the tmrbn prescaler operation. : controls the operation in the idle mode. : controls enabling/disabling of double buffering. tmrba run register 7 6 5 4 3 2 1 0 bit symbol tbarde udack tbaudc e i2tba tbapru n tbarun read/write r/w r/w r/w r/w r/w r/w r r/w after reset 0 0 0 0 0 0 0 0 function double buffering 0: disable 1: enable write "0." sampling clock 0: fs 1: t0/4 enable/ disable two- phase counter 0: disable 1: enable idle 0: stop 1: operate timer run/stop control 0: stop & clear 1: count * the first bit can be read as "0." : controls the tmrba count operation. : controls the tm rba prescaler operation. : controls the operation in the idle mode. : controls enabling/disabling of the two-phase pulse input count operation. enable: the counter counts up and counts down. disable: this is the normal timer mode and the counter counts up only. : selects the two-phase pulse input sampling clock. : controls enabling/disabling of double buffering. tbnrun (0xffff_f1x0) tbarun (0xffff_f1e0)
tmp19a64c1d tmp19a64(rev1.1)-11-10 tmrbn control register (n=0 through a) 7 6 5 4 3 2 1 0 bit symbol tbnen read/write r/w r/w r r r r r r after reset 0 0 0 0 0 0 0 0 function tmrbn operation 0: disable 1: enable write "0." this can be read as "0." this can be read as "0." this can be read as "0." this can be read as "0." this can be read as "0." this can be read as "0." : specifies the tmrb operation. when the operation is disabled, no clock is supplied to the other registers in the tmrb module. this c an reduce power dissipation. (this disables reading from and writing to the other regist ers.) to use the tmrb, enable the tmrb operation (set to "1") before programming each r egister in the tmrb module. if the tmrb operation is executed and then disabled, settings will be maintained in each register. tmrbn mode register (n=0 through a) 7 6 5 4 3 2 1 0 bit symbol tbncp0 tbncpm 1 tbncpm 0 tbncle tbnclk1 tbnclk0 read/write r w r/w after reset 0 0 1 0 0 0 0 0 function this can be read as "00." capture control by software 0: capture by software 1: don't care capture timing 00: disable 01: tbnin0 tbnin1 10: tbnin0 tbnin0 11: captrg captrg up-counter control 0: clear/disable 1: clear/enable selects source clock 00: tb0in0 pin input 01: t1 10: t4 11: t16 : selects the tmrbn timer count clock. : clears and controls the tmrbn up-counter. "0": disables clearing of the up-counter. "1": clears up-counter if there is a match with timer register 1 (tbnrg1). : specifies tmrbn capture timing. "00": capture disable "01": takes count values into capture register 0 (tbncp0) upon the rising of tbnin0 pin input. takes count values into capture register 1 (tbncp1) upon the rising of tbnin1 pin input. "10": takes count values into capture register 0 (tbncp0) upon the rising of tbnin0 pin input. takes count values into capture register 1 (tbncp1) upon the falling of tbnin0 pin input. "11": takes count value into capture register 0 (tbncp0) upon the rising of the timer output for capture trigger (captrg) and into capture register 1 (tbncp1) upon the falling of captrg (tb9out serves as captrg for tmrb0 through tmrb4, and tb3out serves for tmrb5 through tmrba.) : captures count values by software and takes them into capture register 0 (tbncp0). (note) the value read from bit 5 of tbnmod is "1." tbnmod (0xffff_f1x2) tbncr (0xffff_f1x1)
tmp19a64c1d tmp19a64(rev1.1)-11-11 tmrbn flip-flop control register (n=0 through a) 7 6 5 4 3 2 1 0 bit symbol tbnc1t1 tbnc0t1 tbne1t1 tbne0t1 tbnff0c 1 tbnff0c 0 read/write r r/w w after reset 1 1 tbnff0 reverse trigger 0: disable trigger 1: enable trigger function this is always read as "11." when the up-counter value is taken into tbncp1 when the up-counter value is taken into tbncp0 when the up-counter matches tbnrg1 when the up-counter matches tbnrg0 tbnff0 control 00: invert 01: set 10: clear 11: don't care * this is always as "11." : controls the timer flip-flop. "00": reverses the value of tbnff0 (reverse by using software). "01": sets tbnff0 to "1." "10": clears tbnff0 to "0." "11": don't care (note) always read as "11." : reverses the timer flip-flop when the up-counter matches the timer register 0,1 (tbnrg0,1). : reverses the timer flip-flop when the up -counter value is taken into the capture register 0,1 (tbncp0,1). tbnffcr (0xffff_f1x3)
tmp19a64c1d tmp19a64(rev1.1)-11-12 tmrbn status register (1) tmrbn status register (n=0 through 9) 7 6 5 4 3 2 1 0 bit symbol inttbofn inttbn1 inttbn0 read/write r r after reset 0 0 0 0 function this can be read as "0." 0: interrupt not generated 1: interrupt generated 0: interrupt not generated 1: interrupt generated 0: interrupt not generated 1: interrupt generated : interrupt generated if there is a match with timer register 0 (tbnrg0) : interrupt generated if there is a match with timer register 1 (tbnrg1) : interrupt generated if an up-counter overflow occurs (note) if any interrupt is generated, the flag that corresponds to the interrupt is set to tbnst and the generation of interrupt is notified to intc. the flag is cleared by reading the tbnst register. tmrba status register (2) c when tbarun = 0: normal timer mode 7 6 5 4 3 2 1 0 bit symbol inttbofa inttba1 inttba0 read/write r r after reset 0 0 0 0 function this can be read as "0." 0: interrupt not generated 1: interrupt generated 0: interrupt not generated 1: interrupt generated 0: interrupt not generated 1: interrupt generated : interrupt generated if there is a match with timer register 0 (tbarg0) : interrupt generated if there is a match with timer register 1 (tbarg1) : interrupt generated if an up-counter overflow occurs d when tbarun = 1: two-phase pulse input count mode 7 6 5 4 3 2 1 0 bit symbol inttbuda inttbudfa inttboufa read/write r r r after reset 0 0 0 0 0 function this can be read as "0." up-and-down count 0: not generated 1: generated underflow 0: not generated 1: generated overflow 0: not generated 1: generated this can be read as "0." : interrupt generated if an up-and-down counter overflow occurs : interrupt generated if an up-and-down counter underflow occurs : interrupt generated if an up- or down-count occurs (note) if any interrupt is generated, the flag that corresponds to the interrupt is set to tbast and the generation of interrupt is notified to intc. the flag is cleared by reading the tbast register. tbnst (0xffff_f1x4) tbast (0xffff_f1e4) tbast (0xffff_f1e4)
tmp19a64c1d tmp19a64(rev1.1)-11-13 tbnrg0h/l and tbnrg1h/l timer registers tbnrg0h/l timer registers (n=0 through a) 7 6 5 4 3 2 1 0 bit symbol tbnrg0l7 tbnrg0l6 tbnrg0l5 tb nrg0l4 tbnrg0l3 tbnrg0l2 tbnrg0l1 tbnrg0l0 read/write w after reset undefined function timer count value, data of low-order 8 bits 7 6 5 4 3 2 1 0 bit symbol tbnrg0h7 tbnrg0h6 tbnrg0h5 tb nrg0h4 tbnrg0h3 tbnrg0h2 tbnrg0h1 tbnrg0h0 read/write w after reset undefined function timer count value, data of low-order 8 bits (note) to write data to the timer registers, use either a 2-byte data transfer instruction or a 1-byte data transfer instruction written twice in the order of low-order 8 bits followed by high-order 8 bits. tbnrg1h/l timer registers (n=0 through a) 7 6 5 4 3 2 1 0 bit symbol tbnrg1l7 tbnrg1l6 tbnrg1l5 tb nrg1l4 tbnrg1l3 tbnrg1l2 tbnrg1l1 tbnrg1l0 read/write w after reset undefined function timer count value, data of low-order 8 bits 7 6 5 4 3 2 1 0 bit symbol tbnrg1h7 tbnrg1h6 tbnrg1h5 tb nrg1h4 tbnrg1h3 tbnrg1h2 tbnrg1h1 tbnrg1h0 read/write w after reset undefined function timer count value, da ta of high-order 8 bits (note) to write data to the timer registers, use either a 2-byte data transfer instruction or a 1-byte data transfer instruction written twice in the order of low-order 8 bits followed by high-order 8 bits. tbnrg0l (0xffff_f1x8) tbnrg0h (0xffff_f1x9) tbnrg1l (0xffff_f1xa) tbnrg1h (0xffff_f1xb)
tmp19a64c1d tmp19a64(rev1.1)-11-14 tbncp0h/l and tbncp1h/l capture registers tbncp0h/l capture registers (n=0 through a) 7 6 5 4 3 2 1 0 bit symbol tbncp0l7 tbncp0l6 tbncp0l5 tb ncp0l4 tbncp0l3 tbncp0l2 tbncp0l1 tbncp0l0 read/write r after reset undefined function timer capture value, data of low-order 8 bits 7 6 5 4 3 2 1 0 bit symbol tbncp0h7 tbncp0h6 tbncp0h5 tb ncp0h4 tbncp0h3 tbncp0h2 tbncp0h1 tbncp0h0 read/write r after reset undefined function timer capture value, data of high-order 8 bits (note) to read data from the capture registers, use a 1-byte data transfer instruction written twice in the order of low-order 8 bits followed by high- order 8 bits. don't use a 2-byte data transfer instruction. tbncp1h/l capture registers (n=0 through a) 7 6 5 4 3 2 1 0 bit symbol tbncp1l7 tbncp1l6 tbncp1l5 tb ncp1l4 tbncp1l3 tbncp1l2 tbncp1l1 tbncp1l0 read/write r after reset undefined function timer capture value, data of low-order 8 bits 7 6 5 4 3 2 1 0 bit symbol tbncp1h7 tbncp1h6 tbncp1h5 tb ncp1h4 tbncp1h3 tbncp1h2 tbncp1h1 tbncp1h0 read/write r after reset undefined function timer capture value, data of high-order 8 bits (note) to read data from the capture registers, use a 1-byte data transfer instruction written twice in the order of low-order 8 bits followed by high- order 8 bits. don't use a 2-byte data transfer instruction. tbncp0l (0xffff_f1xc) tbncp0h (0xffff_f1xd) tbncp1l (0xffff_f1xe) tbncp1h (0xffff_f1xf)
tmp19a64c1d tmp19a64(rev1.1)-11-15 11.4 description of operations for each mode 11.4.1 16-bit interval timer mode << generating interrupts at periodic cycles >> to generate the inttb0 interrupt, specify a time interval in the tb0rg1 timer register. 7 6 5 4 3 2 1 0 tb0cr 1 0 x x x x x x starts the tmrb0 module. tb0run 0 0 0 0 ? 0x0 stops tmrb0. imc5 x 1 1 0 x 1 0 0 enables inttb0, and sets it to level 4. x ? ? 0 x ? ? ? (setting of inttb0 only is shown here. x ? ? 0 x ? ? ? x ? ? 0 x ? ? ? this is a 32-bit register an d requires settings of other interrupts as well.) tb0ffcr x x 0 0 0 0 ? ? disables the trigger. tb0mod x x 1 0 0 1 * * designates the prescaler output clock as the input clock, tb0rg1l * * * * * * * * and specifies the time interval. tb0rg1h * * * * * * * * (16 bits) tb0run 0 0 0 0 ? 1x1 starts tmrb0. x; don't care ? ; no change 11.4.2 16-bit event counter mode <> the up-counter counts up on the rising edge of tb0in0 pin input. by capturing a value using software and reading the captured value, it is possible to read the count value. 7 6 5 4 3 2 1 0 tb0cr 1 0 x x x x x x starts the tmrb0 module. tb0run 0 0 0 0 ? 0x0 stops tmrb0. pacr ? ? ? ? ? ? ? 0 pafc ? ? ? ? ? ? ? 1 sets p20 to the input mode. imc5 x 1 1 0 x 1 0 0 enables inttb0, and sets it to level 4. x ? ? 0 x ? ? ? x ? ? 0 x ? ? ? x ? ? 0 x ? ? ? (setting of inttb0 only is s hown here. this is a 32- bit register and requires settings of other interrupts as well.) tb0ffcr x x 0 0 0 0 ? ? disables the trigger. tb0mod x x 1 0 0 1 0 0 designates the tb0in0 pin input as the input clock. tb0run 0 0 0 0 ? 1x1 starts tmrb0. tb0mod x x 0 0 0 1 0 0 captures a value using software. tb0cp0l * * * * **** reads the count value of low-order 8 bits. tb0cp0h * * * * **** reads the counter value of high-order 8 bits. x; don't care ? ; no change to be used as the event counter, put the prescaler in a "run" state (tb0run = "1").
tmp19a64c1d tmp19a64(rev1.1)-11-16 11.4.3 16-bit ppg (programmable square wave) output mode square waves with any frequency and any duty (programmable square waves) can be output. the output pulse can be either low- active or high-active. programmable square waves can be output from the tb0out pin by triggering the timer flip-flop (tb0ff) to reverse when the set value of the up-count er matches the set values of the timer registers (tb0rg0h/l and tb0rg1h/l). note that the set values of tb0rg0h/l and tb0rg1h/l must satisfy the following requirement: (set value of tb0rg0h/l) < (set value of tb0rg1h/l) match with tb0rg0h/l (inttb0 interrupt) match with tb0rg1h/l (inttb0 interrupt) tb0out pin fig. 11.4.3.1 example of output of programmable square wave (ppg) in this mode, by enabling the double buffering of tb0rg0 h/l, the value of register buffer 0 is shifted into tb0rg0h/l when the set value of the up-counter matches the set value of tb0rg1h/l. this facilitates handling of small duties. q 1 q 2 q 2 q 3 trigger to shift to tb0rg1 up-counter = q 1 up-counter = q 2 match with tb0rg0 match with tb0rg1 tb0rg0 (compare value) register buffer write tb0rg0 fig. 11.4.3.2 register buffer operation
tmp19a64c1d tmp19a64(rev1.1)-11-17 the block diagram of the 16-bit ppg (programmable square wave) output mode is shown below. selector selector tb0run match tb0rg0 16-bit comparator register buffer 0 16-bit up-counter uc0 f/f (tb0ff0) 16-bit comparator internal data bus tb0rg1 tb0rg0-wr tb0in0 t1 t4 t16 tb0out (ppg output) tb0run clear fig. 11.4.3.3 block diagram of 16-bit ppg mode << example of setting of each register in the 16-bit ppg output mode >> 7 6 5 4 3 2 1 0 tb0cr 1 0 x x x x x x starts the tmrb0 module. tb0run 0 0 0 0 ? 0x0 disables the tb0rg0 double buffering and stops tmrb0. tb0rg0l * * * * * * * * specifies a duty. (16 bits) tb0rg0h * * * * * * * * tb0rg1l * * * * * * * * specifies a cycle. (16 bits) tb0rg1h * * * * * * * * tb0run 1 0 0 0 ? 0x0 enables the tb0rg0 double buffering. (changes the duty/cycle when the inttb0 interrupt is generated) tb0ffcr x x 0 0 1 1 1 0 specifies to trigger tb0ff0 to reverse when a match with tb0rg0 or tb0rg1 is detected, and sets the initial value of tb0ff0 to "0." tb0mod x x 1 0 0 1 * * (** = 01, 10, 11) designates the prescaler output clock as the input clock, and disables the capture function. pacr ? ? ? ? ? 1 ? ? pafc ? ? ? ? ? 1 ? ? assigns pa2 to tb0out. tb0run 1 0 0 0 ? 1x1 starts tmrb0. x; don?t care ? ; no change
tmp19a64c1d tmp19a64(rev1.1)-11-18 11.4.4 applications using the capture function the capture function can be used to develop many applications, including those described below: c one-shot pulse output triggered by an external pulse d frequency measurement e pulse width measurement f time difference measurement c one-shot pulse output triggered by an external pulse one-shot pulse output triggered by an external pulse is carried out as follows: the 16-bit up-counter (uc0) is made to count up by putting it in a free-running state using the prescaler output clock. an external pulse is input through the tb0in0 pin. a trigger is generated at the rising of the external pulse by using the capture function and the value of the up-counter is taken into the capture registers (tb0cp0h/l). the intc must be programmed so that an interrupt int5 is generated at the rising of an external trigger pulse. this interrupt is used to set the timer registers (tb0rg0h/l) to the sum of the tb0cp0h/l value (c) and the delay time (d), (c + d), and set the timer re gisters (tb0rg1h/l) to the sum of the tb0rg0h/l values and the pulse width (p) of one-shot pulse, (c + d + p). in addition, the timer flip-flop control register s (tb0ffcr) must be set to "11." this enables triggering the timer f lip-flop (tb0ff0) to reverse when uc0 matches tb0rg0h/l and tb6rg1h/l. this trigger is disabled by the inttb0 interrupt after a one-shot pulse is output. symbols (c), (d) and (p) used in the text correspond to symbols c, d and p in fig. 11.4.4.1. timer output tb0outpin c + d + p c + d c disable reverse when data is taken into cap1 enable reverse (p) (d) pulse width delay time enable reverse inttb0 generation taking data into the capture register (cap1) int5 generation count clock (internal clock) put the counter in a free-running state tb0in0 pin input (external trigger pulse) match with tb0rg0h/l match with tb0rg1h/l inttb0 generation fig. 11.4.4.1 one-shot pulse output (with delay)
tmp19a64c1d tmp19a64(rev1.1)-11-19 programming example : output a 2-ms one-shot pulse triggered by an external pulse from the tb0in0 pin with a 3-ms delay * clock condition system clock : high speed (fc) high-speed clock gear : 1x (fc) prescaler clock : fperiph/4 (fperiph fsys) main programming 7 6 5 4 3210 tb0cr 1 0 x x x x x x starts the tmrb0 module. tb0mod x x 1 0 1001 puts to a free-running state. uses t1 for counting. takes data into tb0cp0 at the rising of tb0in0 input tb0ffcr x x 0 0 0010 clears tb0ff0 to zero disables tb0ff0 to reverse pacr ? ? ? ? ? 1 ? ? pafc ? ? ? ? ? 1 ? ? assigns pa2 pin to tb0out imc1 x ? ? 0 x ? ? ? x 1 1 0 x 1 0 0 x ? ? 0 x ? ? ? x ? ? 0 x ? ? ? enables int5 these are 32-bit registers a nd must be all processed. imc5 x 1 1 0 x 0 0 0 x ? ? 0 x ? ? ? x ? ? 0 x ? ? ? x ? ? 0 x ? ? ? disables inttb0 these are 32-bit registers a nd must be all processed. tb0run ? 0 0 0 ? 1x1 starts the tmrb0 module. int0 programming tb0rg0l * * * * **** tb0rg0h * * * * **** tb0cp0 + 3ms/ t1 tb0rg1l * * * * **** tb0rg1h * * * * **** tb0rg0 + 2ms/ t1 tb0ffcr x x ? ? 11 ? ? enables tb0ff0 to reverse when there is a match with tb0rg0, 1 imc5 x 1 1 0 x 1 0 0 x ? ? 0 x ? ? ? x ? ? 0 x ? ? ? x ? ? 0 x ? ? ? enables inttb0 inttb0 programming tb0ffcr x x ? ? 00 ? ? disables tb0ff0 to reverse when there is a match with tb0rg0, 1 imc5 x 1 1 0 x 0 0 0 x ? ? 0 x ? ? ? x ? ? 0 x ? ? ? x ? ? 0 x ? ? ? disables inttb0 x; don't care ? ;no change if a delay is not required, tb0ff0 is reversed when data is taken into tb0cp0h/l, and tb0rg1l/h is set to the sum of the tb0cp0h/l value (c) and the one-shot pulse width (p), (c + p), by generating the int5 interrupt. tb0ff0 is enabled to reverse when uc0 matches with tb0rg1l/h, and is disabled by generating the inttb0 interrupt.
tmp19a64c1d tmp19a64(rev1.1)-11-20 c + p c enable reverse (p) pulse width taking data into the capture register tb0cp0 int5 generation count clock (prescaler output clock) tb0in0 input (external trigger pulse) match with tb0rg1l/h timer output tb0out pin taking data into the capture register tb0cp1h/l inttb0 generation enable reverse when data is taken into tb0cp0h/l disable reverse when data is taken into tb0cp1h/l fig. 11.4.4.2 one-shot pulse output tri ggered by an external pulse (without delay) d frequency measurement by using the capture function, the frequency of an external clock can be measured. to measure frequency, another 16-bit timer (tmrb3) is used in combination with the 16-bit event counter mode (tmrb3 reverses tb3ff cr to specify the measurement time). the tb0in0 pin input is selected as the tmrb0 count clock to perform the count operation using an external input clock. tb0mod is set to "11." this setting allows a count value of the 16-bit uc0 up-counter to be taken into the capture register (tb0cp0) upon the rising of a timer flip-flop (tb3ffcr) of the 16-bit timer (t mrb3), and an uc0 counter value to be taken into the capture register (tb0cp1h/l) upon the falling of tb3ff of the 16-bit timer (tmrb3). a frequency is then obtained from the difference between tb0cp0h/l and tb0cp1h/l based on the measurement, by generating the inttb3 16-bit timer interrupt. c2 c1 c2 c1 c2 c1 count clock (tb0in0 pin input) tb3out taking data into tb0cp0h/l taking data into tb0cp1h/l inttb3 fig. 11.4.4.3 frequency measurement for example, if the set width of tb3ff level "1" of the 16-bit timer is 0.5 s and if the difference between tb0cp0h/l and tb0cp1h/l is 100, the frequency is 100 / 0.5 s = 200 hz.
tmp19a64c1d tmp19a64(rev1.1)-11-21 e pulse width measurement by using the capture function, the "h" level width of an external pulse can be measured. specifically, an external pulse is input through the tb0in0 pin and the up-counter (uc0) is made to count up by putting it in a free-running state us ing the prescaler output clock. a trigger is generated at each rising and falling edge of the external pulse by using the capture function and the value of the up-counter is taken into the captur e registers (tb0cp0h/l, tb0cp1h/l). the intc must be programmed so that int5 is generated at the falling edge of an external pulse input through the tb0in0 pin. the "h" level pulse width can be calculated by multiplying the difference between tb0cp0h/l and tb0cp1h/l by the clock cy cle of an internal clock. for example, if the difference between tb0cp0 h/l and tb0cp1h/l is 100 and the cycle of the prescaler output clock is 0.5 s, the "h" level pulse width is 100 0.5 s = 50 s. caution must be exercised when measuring pulse widths exceeding the uc0 maximum count time which is dependant upon the source clock used. the measurement of such pulse widths must be made using software. c2 c1 c2 c1 c2 c1 prescaler output clock tb0in0 pin input (external pulse) taking data into tb0cp0h/l int5 taking data into tb0cp1h/l fig. 11.4.4.4 pulse width measurement the "l" level width of an external pulse can also be measured. in such cases, the difference between c2 generated the first time and c1 generated the second time is initially obtained by performing the second stage of int5 interrupt processing as shown in fig. 11.4.4.5 and this difference is multiplied by the cycle of the prescaler output clock to obtain the "l" level width.
tmp19a64c1d tmp19a64(rev1.1)-11-22 f time difference measurement by using the capture function, the time differ ence between two events can be measured. specifically, the up-counter (uc0) is made to coun t up by putting it in a free-running state using the prescaler output clock. the value of uc0 is taken into the capture regi ster (tb0cp0h/l) at the rising edge of the tb0in0 pin input pulse. the intc must be programmed to generate int5 interrupt at this time. the value of uc0 is taken into the capture register tb0cp1h/l at the rising edge of the tb0in1 pin input pulse. the intc must be programmed to generate int6 interrupt at this time. the time difference can be calculated by mul tiplying the difference between tb0cp1h/l and tb0cp0h/l by the clock cycle of an internal clock. time difference c2 c1 tb0in0 pin input tb0in1 pin input int5 taking data into tb0cp0h/l int6 t aking data into tb0cp1h/l prescaler output clock fig. 11.4.4.5 time difference measurement
tmp19a64c1d tmp19a64(rev1.1)-11-23 11.4.5 two-phase pulse input count mode (tmrba) in this mode, the counter is incremented or decremented by one depending on the state transition of the two-phase clock that is input through tbain0 and tb ain1 and has phase difference. an interrupt is output when a counter overflow or underflow occurs in the up-and-down counter mode, and when the counting operation is executed. this is the multiplication-by-4 mode in which the counter counts up/down at each count. fig. 11.4.5.1 count circuit of two-phase counter 11.4.6 multiplication-by-4 mode c count up at each edge d count down at each edge pin state count condition up down 0 2 0 1 2 3 1 3 3 1 3 2 tbain0,tbain1 1 0 2 0 tbain0 tbain1 1 0 1 1 0 0 1 1 0 1 12 0 30 01 1 1 110 0 0 1 2 1 0 30 up down uc0 int int - b? + b? internal bus (lead clear) :w up upint down downint set c&c3 or t/4
tmp19a64c1d tmp19a64(rev1.1)-11-24 tmrba run register (tbarun) 7 6 5 4 3 2 1 0 bit symbol tbarde udack tbaudce i2tba tbaprun tbarun read/write r/w r/w r/w r/w r/w r/w r r/w after reset 0 0 0 0 0 0 0 0 function double buffer 0: disable 1: enable write "0." select sampling clock 0:fs 1: t0/4 enable/ disable two-phase counter 0: disable 1: enable idle 0: stop 1: operate timer run/stop control 0: stop & clear 1: run (count up) fig. 11.4.6.1 two-phase pulse input count mode setting register for the sampling clock, the fifth bit of the tbarun register is set to "1." << recovery from the sleep mode >> the two-phase counter counts up or down depending on the sleep release input state. c operation mode register setting determines whether the external input signals from the tbain0 and tbain1 input pins are input to the normal 16-bit timer (capture input) or the up-and-down counter. ? in the up-and-down counter mode, capture is ex ecuted by the software only. capture at the external clock timing does not work. ? in the up-and-down counter mode, the comparator is disabled and it does not execute comparison with timer registers. ? the input clock sampling is executed by fs (32 khz) or the high-speed clock (system clock). the maximum input frequency is 4 khz for fs and t0/4 [hz] for the high-speed clock. << how to program the up-and-down counter >> set the tbamod register to " 00" (prescaler off). th en, program the fourth bit of the tbarun register to determine whether to operate the co unter as the up-and-down counter or as the conventional up-counter for external clock input. tbaudce (enable the up-and-down counter) = "0": normal 16-bit timer operation = "1": up-and-down counter operation tbarun (0xffff_f1e0)
tmp19a64c1d tmp19a64(rev1.1)-11-25 d interrupt in the normal or slow mode the inttba interrupt is generated by counting up or down. reading the status register tbast during interrupt handling allows simult aneous check for occurrences of an overflow and an underflow. if tbast is "1," it indicates that an overflow has occurred. if is "1 ," it indicates that an underflow has occurred. this register is cleared after it is read. the counter becomes 0x0000 when an overflow occurs, and it becomes 0xffff when an underflow occurs. after that, the counter continues the counting operation. 7 6 5 4 3 2 1 0 bit symbol inttbuda inttbudf a inttbouf a read/write r r r after reset 0 0 0 0 0 function this can be read as "0." up-and- down count 0: not occurred 1: occurred underflow 0: not occurred 1: occurred overflow 0: not occurred 1: occurre d this can be read as "0." fig. 11.4.6.2 tmrba status register note: the status is cleared after the register is read. in the sleep mode the inttba interrupt is enabled using the interrupt controller (intc). the inttba interrupt is generated by the count-up or count-down input, and the system recovers from the sleep mode. reading the status register tbast during interrupt handling allows simultaneous check for occurrences of an overflow and an underflow tbast (0xffff_f1e4)
tmp19a64c1d tmp19a64(rev1.1)-11-26 e up-and-down counter when the two-phase input count mode is selected (tbarun = "1"), the up-counter becomes the up-and-down counter and it is initialized to 0x7fff. if a counter overflow occurs, the counter returns to 0x0000. if a counter underflow occurs, the counter returns to 0xffff. after that, the counter continues the counting operation. therefore, the state can be checked by reading the counter value and the status flag tbast after an interrupt is generated. (note 1) the up (down) count input must be set to the "h" level for the states before and after an input. (note 2) reading of counter value must be executed during inttba interrupt handling up-count input up-and-down counter value up-and-down interrupt sampling clock 0x3fff 0x4000 0x4001
tmp19a64c1d tmp19a64(rev1.1) 12-1 12. 32-bit input capture (tmrc) tmrc consists of one channel with a 32-bit time base timer (tbt), four channels (tccap0 through tccap3) each with a 32-bit input ca pture register, and ten channels (tccm p0 through tccmp9) each with a 32-bit compare register. fig. 12-1 shows the tmrc block diagram. 2 4 8 16 32 64 128 256 512 tbtin (pf7) prescaler output t2 through t256 tc0in (pg0) fig. 12.1 timer c block diagram noise removal circuit 32-bit time base timer (tbt) overflow interrupt (inttbt) clear & count control circuit noise removal circuit edge detection 32-bit input capture (tccap0) capture 0 interrupt (intcap0) capture registers 0 through 3 (tccap0 through tccap3) prescaler input clock ( t0) t2 t4 t8 t16 t32 t64 t128 t256 run & clear 32-bit comparator 32-bit register buffer 0 compare match interrupt 0 (intcmp0) (intcapa) compare match trigge r (cmp0trg) compare registers 0 through 9 (tccmp0 through tccmp9) compare match output ( tcout0 ) tbtcr cap0cr cap0cr 32-bit compare register 0 (tccmp0)
tmp19a64c1d tmp19a64(rev1.1) 12-2 12.1 description for operations of each circuit 12.2.1 prescaler the prescaler is provided to acquire the tmrc source clock. the prescaler input clock t0 is fperiph/2, fperiph/4, fperiph/8 or fperiph/16 selected by syscr0 in the cg. t2 through t256 generated by dividing t0 are available as tmrc prescaler input clocks and can be selected with tbtcr. fperiph is either "fgear" which is a clock selected by syscr1 in the cg, or "fc" which is a clock before it is divided by the clock gear. the operation or stoppage of the prescaler is se t with tbtrun where writing "1" starts counting and writing "0" clears and stops counting. tabl e 12-1 shows the prescaler output clock resolutions.
tmp19a64c1d tmp19a64(rev1.1) 12-3 table 12.1 prescaler output clock resolutions (if any of high-speed clock gears 8/8, 4/8, 2/8 and 1/8 is selected) @fc = 54mhz select peripheral clock clock gear value select prescaler clock prescaler output clock resolution t2 t4 t8 t16 00(fperiph/16) fc/2 6 (1.19 s) fc/2 7 (2.37 s) fc/2 8 (4.74 s) fc/2 9 (9.48 s) 01(fperiph/8) fc/2 5 (0.59 s) fc/2 6 (1.19 s) fc/2 7 (2.37 s) fc/2 8 (4.74 s) 10(fperiph/4) fc/2 4 (0.30 s) fc/2 5 (0.59 s) fc/2 6 (1.19 s) fc/2 7 (2.37 s) 000(fc) 11(fperiph/2) fc/2 3 (0.15 s) fc/2 4 (0.30 s) fc/2 5 (0.59 s) fc/2 6 (1.19 s) 00(fperiph/16) fc/2 7 (2.37 s) fc/2 8 (4.74 s) fc/2 9 (9.48 s) fc/2 10 (18.96 s) 01(fperiph/8) fc/2 6 (1.19 s) fc/2 7 (2.37 s) fc/2 8 (4.74 s) fc/2 9 (9.48 s) 10(fperiph/4) fc/2 5 (0.59 s) fc/2 6 (1.19 s) fc/2 7 (2.37 s) fc/2 8 (4.74 s) 100(fc/2) 11(fperiph/2) fc/2 4 (0.30 s) fc/2 5 (0.59 s) fc/2 6 (1.19 s) fc/2 7 (2.37 s) 00(fperiph/16) fc/2 8 (4.74 s) fc/2 9 (9.48 s) fc/2 10 (18.96 s) fc/2 11 (37.93 s) 01(fperiph/8) fc/2 7 (2.z/37 s) fc/2 8 (4.74 s) fc/2 9 (9.48 s) fc/2 10 (18.96 s) 10(fperiph/4) fc/2 6 (1.19 s) fc/2 7 (2.37 s) fc/2 8 (4.74 s) fc/2 9 (9.48 s) 110(fc/4) 11(fperiph/2) fc/2 5 (0.59 s) fc/2 6 (1.19 s) fc/2 7 (2.37 s) fc/2 8 (4.74 s) 00(fperiph/16) fc/2 9 (9.48 s) fc/2 10 (18.96 s) fc/2 11 (37.93 s) fc/2 12 (75.85 s) 01(fperiph/8) fc/2 8 (4.74 s) fc/2 9 (9.48 s) fc/2 10 (18.96 s) fc/2 11 (37.93 s) 10(fperiph/4) fc/2 7 (2.37 s) fc/2 8 (4.74 s) fc/2 9 (9.48 s) fc/2 10 (18.96 s) 0(fgear) 111(fc/8) 11(fperiph/2) fc/2 6 (1.19 s) fc/2 7 (2.37 s) fc/2 8 (4.74 s) fc/2 9 (9.48 s) 00(fperiph/16) fc/2 6 (1.19 s) fc/2 7 (2.37 s) fc/2 8 (4.74 s) fc/2 9 (9.48 s) 01(fperiph/8) fc/2 5 (0.59 s) fc/2 6 (1.19 s) fc/2 7 (2.37 s) fc/2 8 (4.74 s) 10(fperiph/4) fc/2 4 (0.30 s) fc/2 5 (0.59 s) fc/2 6 (1.19 s) fc/2 7 (2.37 s) 000(fc) 11(fperiph/2) fc/2 3 (0.15 s) fc/2 4 (0.30 s) fc/2 5 (0.59 s) fc/2 6 (1.19 s) 00(fperiph/16) fc/2 6 (1.19 s) fc/2 7 (2.37 s) fc/2 8 (4.74 s) fc/2 9 (9.48 s) 01(fperiph/8) fc/2 5 (0.59 s) fc/2 6 (1.19 s) fc/2 7 (2.37 s) fc/2 8 (4.74 s) 10(fperiph/4) fc/2 4 (0.30 s) fc/2 5 (0.59 s) fc/2 6 (1.19 s) fc/2 7 (2.37 s) 100(fc/2) 11(fperiph/2) fc/2 3 (0.15 s) fc/2 4 (0.30 s) fc/2 5 (0.59 s) fc/2 6 (1.19 s) 00(fperiph/16) fc/2 6 (1.19 s) fc/2 7 (2.37 s) fc/2 8 (4.74 s) fc/2 9 (9.48 s) 01(fperiph/8) fc/2 5 (0.59 s) fc/2 6 (1.19 s) fc/2 7 (2.37 s) fc/2 8 (4.74 s) 10(fperiph/4) fc/2 4 (0.30 s) fc/2 5 (0.59 s) fc/2 6 (1.19 s) fc/2 7 (2.37 s) 110(fc/4) 11(fperiph/2) ? fc/2 4 (0.30 s) fc/2 5 (0.59 s) fc/2 6 (1.19 s) 00(fperiph/16) fc/2 6 (1.19 s) fc/2 7 (2.37 s) fc/2 8 (4.74 s) fc/2 9 (9.48 s) 01(fperiph/8) fc/2 5 (0.59 s) fc/2 6 (1.19 s) fc/2 7 (2.37 s) fc/2 8 (4.74 s) 10(fperiph/4) ? fc/2 5 (0.59 s) fc/2 6 (1.19 s) fc/2 7 (2.37 s) 1(fc) 111(fc/8) 11(fperiph/2) ? ? fc/2 5 (0.59 s) fc/2 6 (1.19 s)
tmp19a64c1d tmp19a64(rev1.1) 12-4 @fc = 54mhz select peripheral clock clock gear value select prescaler clock prescaler output clock resolution t32 t64 t128 t256 00(fperiph/16) fc/2 10 (18.96 s) fc/2 11 (37.93 s) fc/2 12 (75.85 s) fc/2 13 (151.7 s) 01(fperiph/8) fc/2 9 (9.48 s) fc/2 10 (18.96 s) fc/2 11 (37.93 s) fc/2 12 (75.85 s) 10(fperiph/4) fc/2 8 (4.74 s) fc/2 9 (9.48 s) fc/2 10 (18.96 s) fc/2 11 (37.93 s) 000(fc) 11(fperiph/2) fc/2 7 (2.37 s) fc/2 8 (4.74 s) fc/2 9 (9.48 s) fc/2 10 (18.96 s) 00(fperiph/16) fc/2 11 (37.93 s) fc/2 12 (75.85 s) fc/2 13 (151.7 s) fc/2 14 (303.4 s) 01(fperiph/8) fc/2 10 (18.96 s) fc/2 11 (37.93 s) fc/2 12 (75.85 s) fc/2 13 (151.7 s) 10(fperiph/4) fc/2 9 (9.48 s) fc/2 10 (18.96 s) fc/2 11 (37.93 s) fc/2 12 (75.85 s) 100(fc/2) 11(fperiph/2) fc/2 8 (4.74 s) fc/2 9 (9.48 s) fc/2 10 (18.96 s) fc/2 11 (37.93 s) 00(fperiph/16) fc/2 12 (75.85 s) fc/2 13 (151.7 s) fc/2 14 (303.4 s) fc/2 15 (606.8 s) 01(fperiph/8) fc/2 11 (37.93 s) fc/2 12 (75.85 s) fc/2 13 (151.7 s) fc/2 14 (303.4 s) 10(fperiph/4) fc/2 10 (18.96 s) fc/2 11 (37.93 s) fc/2 12 (75.85 s) fc/2 13 (151.7 s) 110(fc/4) 11(fperiph/2) fc/2 9 (9.48 s) fc/2 10 (18.96 s) fc/2 11 (37.93 s) fc/2 12 (75.85 s) 00(fperiph/16) fc/2 13 (151.7 s) fc/2 14 (303.4 s) fc/2 15 (606.8 s) fc/2 16 (1213.6 s) 01(fperiph/8) fc/2 12 (75.85 s) fc/2 13 (151.7 s) fc/2 14 (303.4 s) fc/2 15 (606.8 s) 10(fperiph/4) fc/2 11 (37.93 s) fc/2 12 (75.85 s) fc/2 13 (151.7 s) fc/2 14 (303.4 s) 0(fgear) 111(fc/8) 11(fperiph/2) fc/2 10 (18.96 s) fc/2 11 (37.93 s) fc/2 12 (75.85 s) fc/2 13 (151.7 s) 00(fperiph/16) fc/2 10 (18.96 s) fc/2 11 (37.93 s) fc/2 12 (75.85 s) fc/2 13 (151.7 s) 01(fperiph/8) fc/2 9 (9.48 s) fc/2 10 (18.96 s) fc/2 11 (37.93 s) fc/2 12 (75.85 s) 10(fperiph/4) fc/2 8 (4.74 s) fc/2 9 (9.48 s) fc/2 10 (18.96 s) fc/2 11 (37.93 s) 000(fc) 11(fperiph/2) fc/2 7 (2.37 s) fc/2 8 (4.74 s) fc/2 9 (9.48 s) fc/2 10 (18.96 s) 00(fperiph/16) fc/2 10 (18.96 s) fc/2 11 (37.93 s) fc/2 12 (75.85 s) fc/2 13 (151.7 s) 01(fperiph/8) fc/2 9 (9.48 s) fc/2 10 (18.96 s) fc/2 11 (37.93 s) fc/2 12 (75.85 s) 10(fperiph/4) fc/2 8 (4.74 s) fc/2 9 (9.48 s) fc/2 10 (18.96 s) fc/2 11 (37.93 s) 100(fc/2) 11(fperiph/2) fc/2 7 (2.37 s) fc/2 8 (4.74 s) fc/2 9 (9.48 s) fc/2 10 (18.96 s) 00(fperiph/16) fc/2 10 (18.96 s) fc/2 11 (37.93 s) fc/2 12 (75.85 s) fc/2 13 (151.7 s) 01(fperiph/8) fc/2 9 (9.48 s) fc/2 10 (18.96 s) fc/2 11 (37.93 s) fc/2 12 (75.85 s) 10(fperiph/4) fc/2 8 (4.74 s) fc/2 9 (9.48 s) fc/2 10 (18.96 s) fc/2 11 (37.93 s) 110(fc/4) 11(fperiph/2) fc/2 7 (2.37 s) fc/2 8 (4.74 s) fc/2 9 (9.48 s) fc/2 10 (18.96 s) 00(fperiph/16) fc/2 10 (18.96 s) fc/2 11 (37.93 s) fc/2 12 (75.85 s) fc/2 13 (151.7 s) 01(fperiph/8) fc/2 9 (9.48 s) fc/2 10 (18.96 s) fc/2 11 (37.93 s) fc/2 12 (75.85 s) 10(fperiph/4) fc/2 8 (4.74 s) fc/2 9 (9.48 s) fc/2 10 (18.96 s) fc/2 11 (37.93 s) 1(fc) 111(fc/8) 11(fperiph/2) fc/2 7 (2.37 s) fc/2 8 (4.74 s) fc/2 9 (9.48 s) fc/2 10 (18.96 s) (note 1) the prescaler output clock tn must be selected so that tn tmp19a64c1d tmp19a64(rev1.1) 12-5 12.2.2 noise removal circuit the noise removal circuit removes noises from an external clock source input (tbtin) and a capture trigger input (tcnin) of the time base timer (tbt). it can also output input signals without removing noises from them. 12.2.3 32-bit time base timer (tbt) this is a 32-bit binary counter that counts up upon the rising of an input clock specified by the tbt control register tbtcr of the time base timer. based on the tbtcr setting, an input cl ock is selected from external clocks supplied through the tbtin pin and eight prescaler output clocks t2 t4 t8 t16 t32 t64 t128 and t256. "count," "stop" or "clear" of the up-counter can be selected with tbtrun. when a reset is performed, the up-counter is in a clear ed state and the timer is in an idle state. as counting starts, the up- counter operates in a free-running condition. as it reaches an overflow state, the overflow interrupt inttbt is generated; subsequently, the count value is cleared to 0 and the up-counter restarts a count-up operation. inttbt is controlled by the tcgst and tcgim that are grouped in the same way as intcap0 through intcap3 are (see the explanatio n about the 32-bit capture register). this counter can perform a read capture operation. when it is performing a read capture operation, it is possible to read a counter value by accessing the tbt read capture register (tbtrdcap) in units of 32 bits. however, a counter value cannot be read (captured) if the register is accessed in units of 8 or 16 bits.
tmp19a64c1d tmp19a64(rev1.1) 12-6 12.2.4 edge detection circuit by performing sampling, this circuit detects the input edge of an external capture input (tcnin). it can be set to "rising edge," "falling edge," "both edges" or "not capture" by provisioning the capture control register capncr. fig. 12.2.4.1 shows capture inputs, outputs (capture factor outputs) produced by the edge detection circuit, and specific detection circuit settings. fig. 12.2.4.1 capture inputs and capt ure factor outputs (outputs produce d by the edge detection circuit) 12.2.5 32-bit capture register this is a 32-bit register for capturing count values of the time base timer by using capture factors as triggers. if a capture operation is performed, the capture interrupt intcapn is ge nerated. four interrupt requests intcap0 through intcap3 are grouped into one set of interrupt requests which are then notified to the interrupt controller. which one of interrupt requests intcap0 through intcap3 must be processed can be identified by reading the status regi ster tcgst during interrupt processing. additionally, it is possible to mask unnecessary interrupts by setting the interrupt ma sk register tcgim to an appropriate bit setting. while a read of the capture register is ongoing, coun t values cannot be captured even if there are triggers. tcnin input capture factor (rising edge setting) (falling edge setting) (both-edge setting) (not capture setting)
tmp19a64c1d tmp19a64(rev1.1) 12-7 12.2.6 32-bit compare register this is a 32-bit register for specifying a compare va lue. tmrc has ten built-in compare registers, tccmp0 through tccmp9. if values set in these compare regist ers match the value of the time base timer tbt, the match detection signal of a comparator becomes active. "compare enable" or "compare disable" can be specified with the compare cont rol register cmpctl. to set tccmpn to a specific value, data must be transferred to tccmpn in the order of lower to higher bits by using a byte data transfer instruction. if a byte data transfer instruction is used, data is transferred four times to tccmpn. each compare register has a double-b uffer structure, that is, tccmpn fo rms a pair with a register buffer "n." "enable" or "disable" of the double buffers is controlled by the compare control register cmpctl . if is set to "0," the double buffers are disabled. if is set to "1," they are enabled. if the double buffers are enabled, data transfer from th e register buffer "n" to the compare register tccmpn takes place when the value of tbt matches that of tccmpn. because tccmpn is indeterminate when a reset is perf ormed, it is necessary to prepare and write data in advance. a reset initializes cmpctl to "0" and disables the double buffers. to use the double buffers, data must be written to the compare re gister, must be set to "1," and then the following data must be written to the register buffer. tccmpn and the register buffer are assigned to the same address. if is "0," the same value is written to tccmpn and each register buffer. if is "1," data is written to each register buffer only. therefore, to write an initial va lue to the compare register, it is necessary to set the double buffers to "disable."
tmp19a64c1d tmp19a64(rev1.1) 12-8 12.3 register description tmrc control register 7 6 5 4 3 2 1 0 bit symbol tcen i2tbt read/write r/w r after reset 0 0 0 0 0 0 0 0 function tmrc operation 0: disable 1: enable idle 0: stop 1: run tccr (fffff400h) : controls the operation in idle mode : specifies enabling/disabling of the tmrc opera tion. if set to "disable," a clock is not supplied to other registers of the tmrc module and, therefore, a reduction in power consumption is possible (a read of or a write to other registers cannot be executed). to use tmrc, the tmrc operation must be set to "enable" ("1") before making individual register settings of tmrc modules. if tmrc is operated and then set to "dis able," individual regist er settings are retained. (note) values read from bits 0 through 5 of tccr are all "0." tbtrun register 7 6 5 4 3 2 1 0 bit symbol tbtcap tbtprun tbtrun read/write r r/w after reset 0 0 0 0 0 0 0 0 function ensure this is set to "0." tbt counter software capture 0: don?t care 1: software capture timer run/stop control 0: stop & clear 1: count tbtrun (fffff401h) : controls the tbt count operation : controls the tbt prescaler operation : if this is set to "1," the count value of the time base timer (tbt) is taken into the capture register tbtcapn. (note) values read from bits 4 through 7 of tbtrun are all "0." fig. 12.3.1 tmrc-related registers
tmp19a64c1d tmp19a64(rev1.1) 12-9 tbt control register 7 6 5 4 3 2 1 0 bit symbol tbtnf tbtc lk3 tbtclk2 tbtclk1 tbtclk0 read/write r/w after reset 0 0 0 0 0 0 0 0 function tbtin input noise removal 0: disable 1: enable ensure this is set to "0." tbt source clock 0000: t2 0001: t4 0010: t8 0011: t16 0100: t32 0101: t64 0110: t128 0111: t256 1111: tbtin pin input tbtcr (fffff402h) : this is an input clock for tbt. clocks from "0000" to "0111" are available as prescaler output clocks. a clock "1111" is i nput through the tbtin pin. : controls the noise removal for the tbtin pin input. if this is set to "0" (removal disabled), any input of more than 2/fsys (37ns@fperiph=fc=54mhz) is accepted as a sour ce clock for tbt, at whichever level the tbtin pin is, "h" or "l." if this is set to "1" (removal enabled), any input of less than 6/fsys (111ns@fperiph=fc=54mhz) is regarded as noise and removed, at whichever level the tbtin pin is, "h" or "l." the range of removal changes depending on the selected clock gear and a system clock used. tbt capture register (tbtcap) 7 6 5 4 3 2 1 0 bit symbol cap07 cap06 cap05 cap04 cap03 cap02 cap01 cap00 read/write r after reset 0 0 0 0 0 0 0 0 function capture data (bits 7 through 0) 7 6 5 4 3 2 1 0 bit symbol cap15 cap14 cap13 cap12 cap11 cap10 cap09 cap08 read/write r after reset 0 0 0 0 0 0 0 0 function capture data (bits 15 through 8) 7 6 5 4 3 2 1 0 bit symbol cap23 cap22 cap21 cap20 cap19 cap18 cap17 cap16 read/write r after reset 0 0 0 0 0 0 0 0 function capture data (bits 23 through 16) 7 6 5 4 3 2 1 0 bit symbol cap31 cap30 cap29 cap28 cap27 cap26 cap25 cap24 read/write r after reset 0 0 0 0 0 0 0 0 function capture data (bits 31 through 24) tbtcap3 (fffff407h) tbtcap2 (fffff406h) tbtcap1 (fffff405h) tbtcap0 (fffff404h) fig. 12.3.2 tmrc-related registers
tmp19a64c1d tmp19a64(rev1.1) 12-10 tbt capture register (tbtrdcap) 7 6 5 4 3 2 1 0 bit symbol rdcap07 rdcap06 rdcap05 rdcap04 rdcap03 rdcap02 rdcap01 rdcap00 read/write r after reset 0 0 0 0 0 0 0 0 function capture data (bits 7 through 0) 7 6 5 4 3 2 1 0 bit symbol rdcap17 rdcap16 rdcap15 rdcap14 rdcap13 rdcap12 rdcap11 rdcap10 read/write r after reset 0 0 0 0 0 0 0 0 function capture data (bits 15 through 8) 7 6 5 4 3 2 1 0 bit symbol rdcap27 rdcap26 rdcap25 rdcap24 rdcap23 rdcap22 rdcap21 rdcap20 read/write r after reset 0 0 0 0 0 0 0 0 function capture data (bits 23 through 16) 7 6 5 4 3 2 1 0 bit symbol rdcap37 rdcap36 rdcap35 rdcap34 rdcap33 rdcap32 rdcap31 rdcap30 read/write r after reset 0 0 0 0 0 0 0 0 function capture data (bits 31 through 24) tbtrdcap1 (fffff409h) tbtrdcap0 (fffff408h) tbtrdcap2 (fffff40ah) tbtrdcap3 (fffff40bh) fig. 12.3.3 tmrc-related registers
tmp19a64c1d tmp19a64(rev1.1) 12-11 tmrc capture 0 control register 7 6 5 4 3 2 1 0 bit symbol tc0nf cp0eg1 cp0eg0 read/write r/w r r/w after reset 0 0 0 0 0 0 0 0 function tc0in input noise removal 0: disable 1: enable select effective edge of tc0in input 00: not capture 01: rising edge 10: falling edge 11: both edges cap0cr (fffff410h) : selects the effective edge of an input to the trigger input pin tc0in of the capture 0 register (tccap0). if this is set to "00," the capture operation is disabled. : controls the noise removal for the tc0in pin input. if this is set to "0" (removal disabled), any input of more than 2/fsys (37ns@fperiph=fc=54mhz) is accepted as a trigge r input for tccap0, at whichever level the tc0in pin is, "h" or "l." if this is set to "1" (removal enabled), any input of less than 6/fsys (111ns@fperiph=fc=54mhz) is regarded as noise and removed, at whichever level the tc0in pin is, "h" or "l." the range of removal changes depending on the selected clock gear and a system clock used. (note) values read from bits 2 through 6 of capocr are all "0." tmrc capture 0 register (tccap0) 7 6 5 4 3 2 1 0 bit symbol cap007 cap006 cap005 cap004 cap003 cap002 cap001 cap000 read/write r after reset 0 0 0 0 0 0 0 0 function capture 0 data (bits 7 through 0) 7 6 5 4 3 2 1 0 bit symbol cap017 cap016 cap015 cap014 cap013 cap012 cap011 cap010 read/write r after reset 0 0 0 0 0 0 0 0 function capture 0 data (bits 15 through 8) 7 6 5 4 3 2 1 0 bit symbol cap027 cap026 cap025 cap024 cap023 cap022 cap021 cap020 read/write r after reset 0 0 0 0 0 0 0 0 function capture 0 data (bits 23 through 16) 7 6 5 4 3 2 1 0 bit symbol cap037 cap036 cap035 cap034 cap033 cap032 cap031 cap030 read/write r after reset 0 0 0 0 0 0 0 0 function capture 0 data (bits 31 through 24) tccap0ll (fffff414h) tccap0lh (fffff415h) tccap0hl (fffff416h) tccap0hh (fffff417h) (note) data is not captured during a read of the capture register. fig. 12.3.4 tmrc-related registers
tmp19a64c1d tmp19a64(rev1.1) 12-12 tmrc capture 1 control register 7 6 5 4 3 2 1 0 bit symbol tc1nf cp1eg1 cp1eg0 read/write r/w r r/w after reset 0 0 0 0 0 0 0 0 function tc1in input noise removal 0: disable 1: enable select effective edge of tc1in input 00: not capture 01: rising edge 10: falling edge 11: both edges cap1cr (fffff418h) : selects the effective edge of an input to the trigger input pin tc1in of the capture 1 register (tccap1). if this is set to "00," the capture operation is disabled. : controls the noise removal for the tc1nf pin input. if this is set to "0" (removal disabled), any input of more than 2/fsys (37ns@fperiph=fc=54mhz) is accepted as a trig ger input for tccap1, at whichever level tc1in pin is, "h" or "l." if this is set to "1" (removal enabled), any input of less than 6/fsys (111ns@fperiph=fc=54mhz) is regarded as noise and removed, at whichever level the tc1in pin is, "h" or "l." the range of removal changes depending on the selected clock gear and a system clock used. (note) values read from bits 2 through 6 of cap1cr are all "0." tmrc capture 1 register (tccap1) 7 6 5 4 3 2 1 0 bit symbol cap107 cap106 cap105 cap104 cap103 cap102 cap101 cap100 read/write r after reset 0 0 0 0 0 0 0 0 function capture 1 data (bits 7 through 0) 7 6 5 4 3 2 1 0 bit symbol cap117 cap116 cap115 cap114 cap113 cap112 cap111 cap110 read/write r after reset 0 0 0 0 0 0 0 0 function capture 1 data (bits 15 through 8) 7 6 5 4 3 2 1 0 bit symbol cap127 cap126 cap125 cap124 cap123 cap122 cap121 cap120 read/write r after reset function capture 1 data (bits 23 through 16) 7 6 5 4 3 2 1 0 bit symbol cap137 cap136 cap135 cap134 cap133 cap132 cap131 cap130 read/write r after reset 0 0 0 0 0 0 0 0 function capture 1 data (bits 31 through 24) tccap1ll (fffff41ch) tccap1lh (fffff41dh) tccap1hl (fffff41eh) tccap1hh (fffff41fh) (note) data is not captured during a read of the capture register. fig. 12.3.5 tmrc-related registers
tmp19a64c1d tmp19a64(rev1.1) 12-13 tmrc capture 2 control register 7 6 5 4 3 2 1 0 bit symbol tc2nf cp2eg1 cp2eg0 read/write r/w r r/w after reset 0 0 0 0 0 0 0 0 function tc2in input noise removal 0: disable 1: enable select effective edge of tc2in input 00: not capture 01: rising edge 10: falling edge 11: both edges cap2cr (fffff420h) : selects the effective edge of an input to the trigger input pin tc2in of the capture 2 register (tccap2). if this is set to "00," the capture operation is disabled. : controls the noise removal for the tc2in pin input. if this is set to "0" (removal disabled), any input of more than 2/fsys (37ns@fperiph=fc=54mhz) is accepted as a trigger input for tccap2, at wh ichever level the tc2in pin is, "h" or "l." if this is set to "1" (removal enabled), any input of less than 6/fsys (111ns@fperiph=fc=54mhz) is regarded as noise and removed, at whichever level the tc2in pin is, "h" or "l." the range of removal changes depending on the selected clock gear and a system clock used. (note) values read from bits 2 through 6 of cap2cr are all "0." tmrc capture 2 register (tccap2) 7 6 5 4 3 2 1 0 bit symbol cap207 cap206 cap205 cap204 cap203 cap202 cap201 cap200 read/write r after reset 0 0 0 0 0 0 0 0 function capture 2 data (bits 7 through 0) 7 6 5 4 3 2 1 0 bit symbol cap217 cap216 cap215 cap214 cap213 cap212 cap211 cap210 read/write r after reset 0 0 0 0 0 0 0 0 function capture 2 data (bits 15 through 8) 7 6 5 4 3 2 1 0 bit symbol cap227 cap226 cap225 cap224 cap223 cap222 cap221 cap220 read/write r after reset 0 0 0 0 0 0 0 0 function capture 2 data (bits 23 through 16) 7 6 5 4 3 2 1 0 bit symbol cap237 cap236 cap235 cap234 cap233 cap232 cap231 cap230 read/write r after reset 0 0 0 0 0 0 0 0 function capture 2 data (bits 31 through 24) tccap2ll (fffff424h) tccap2lh (fffff425h) tccap2hl (fffff426h) tccap2hh (fffff427h) (note) data is not captured during a read of the capture register. fig. 12.3.6 tmrc-related registers
tmp19a64c1d tmp19a64(rev1.1) 12-14 tmrc capture 3 control register 7 6 5 4 3 2 1 0 bit symbol tc3nf cp3eg1 cp3eg0 read/write r/w r r/w after reset 0 0 0 0 0 0 0 0 function tc3in input noise removal 0: disable 1: enable select effective edge of tc3in input 00: not capture 01: rising edge 10: falling edge 11: both edges cap3cr (fffff428h) : selects the effective edge of an input to the trigger input pin tc3in of the capture 3 register (tccap3). if this is set to "00," the capture operation is disabled. : controls the noise removal for the tc3in pin input. if this is set to "0" (removal disabled), any input of more than 2/fsys (37ns@fperiph=fc=54mhz) is accepted as a trigger input for tccap3, at wh ichever level the tc3in pin is, "h" or "l." if this is set to "1" (removal enabled), any input of less than 6/fsys (111ns@fperiph=fc=54mhz) is regarded as noise and removed, at whichever level the tc3in pin is, "h" or "l." the range of removal changes depending on the selected clock gear and a system clock used. (note) values read from bits 2 through 6 of cap3cr are all "0." tmrc capture 3 register (tccap3) 7 6 5 4 3 2 1 0 bit symbol cap307 cap306 cap305 cap304 cap303 cap302 cap301 cap300 read/write r after reset 0 0 0 0 0 0 0 0 function capture 3 data (bits 7 through 0) 7 6 5 4 3 2 1 0 bit symbol cap317 cap316 cap315 cap314 cap313 cap312 cap311 cap310 read/write r after reset 0 0 0 0 0 0 0 0 function capture 3 data (bits 15 through 8) 7 6 5 4 3 2 1 0 bit symbol cap327 cap326 cap325 cap324 cap323 cap322 cap321 cap320 read/write r after reset 0 0 0 0 0 0 0 0 function capture 3 data (bits 23 through 16) 7 6 5 4 3 2 1 0 bit symbol cap337 cap336 cap335 cap334 cap333 cap332 cap331 cap330 read/write r after reset 0 0 0 0 0 0 0 0 function capture 3 data (bits 31 through 24) tccap3ll (fffff42ch) tccap3lh (fffff42dh) tccap3hl (fffff42eh) tccap3hh (fffff42fh) (note) data is not captured during a read of the capture register. fig. 12.3.7 tmrc-related registers
tmp19a64c1d tmp19a64(rev1.1) 12-15 tmrcg interrupt mask register 7 6 5 4 3 2 1 0 bit symbol tbtim tcim3 tcim2 tcim1 tcim0 read/write r r/w after reset 0 0 0 0 0 0 0 0 function mask 1: inttbt mask 1: intcap3 mask 1: intcap2 mask 1: intcap1 mask 1: intcap0 tcgim (fffff40ch) (note) values read from bits 5, 6 and 7 of tcgim are all "0." tmrcg status register 7 6 5 4 3 2 1 0 bit symbol inttbt intcap3 intcap2 intcap1 intcap0 read/write r after reset 0 0 0 0 0 0 0 0 function 0: interrupt not generated 1: interrupt generated 0: interrupt not generated 1: interrupt generated 0: interrupt not generated 1: interrupt generated 0: interrupt not generated 1: interrupt generated 0: interrupt not generated 1: interrupt generated tcgst (fffff40dh) (note 1) a read of tcgst clears bits 0, 1, 2, 3 and 4. (note 2) values read from bits 5, 6 and 7 of tcgst are all "0." fig. 12.3.8 tmrc-related registers
tmp19a64c1d tmp19a64(rev1.1) 12-16 tmrc compare control register (cmpctln) 7 6 5 4 3 2 1 0 bit symbol tcffen0 tcffc01 tcffc00 cmprde0 cmpen0 read/write r r/w r r/w after reset 0 0 1 1 0 0 0 0 function tcff0 reversal 0: disable 1: enable tcff0 control 00: reversal 01: set 10: clear 11: don?t care double buffers 0 0: disable 1: enable compare 0 enable 0: disable 1: enable 7 6 5 4 3 2 1 0 bit symbol tcffen1 tcffc11 tcffc10 cmprde1 cmpen1 read/write r r/w r r/w after reset 0 0 1 1 0 0 0 0 function tcff1 reversal 0: disable 1: enable tcff1 control 00: reversal 01: set 10: clear 11: don?t care double buffers 1 0: disable 1: enable compare 1 enable 0: disable 1: enable 7 6 5 4 3 2 1 0 bit symbol tcffen2 tcffc21 tcffc20 cmprde2 cmpen2 read/write r r/w r r/w after reset 0 0 1 1 0 0 0 0 function tcff2 reversal 0: disable 1: enable tcff2 control 00: reversal 01: set 10: clear 11: don?t care double buffers 2 0: disable 1: enable compare 2 enable 0: disable 1: enable 7 6 5 4 3 2 1 0 bit symbol tcffen3 tcffc31 tcffc30 cmprde3 cmpen3 read/write r r/w r r/w after reset 0 0 1 1 0 0 0 0 function tcff3 reversal 0: disable 1: enable tcff3 control 00: reversal 01: set 10: clear 11: don?t care double buffers 3 0: disable 1: enable compare 3 enable 0: disable 1: enable cmpctl3 (fffff473h) cmpctl2 (fffff472h) cmpctl1 (fffff471h) cmpctl0 (fffff470h) : controls enable/disable of the compare match detection. : controls enable/disable of double buffers of the compare register. : controls f/f of the compare match output. : controls enable/disable of f/f reversal of the compare match output. (note) values read from bits 7, 3 and 2 of cmpctln are all "0." fig. 12.3.9 tmrc-r elated registers
tmp19a64c1d tmp19a64(rev1.1) 12-17 tmrc compare control register (cmpctln) 7 6 5 4 3 2 1 0 bit symbol tcffen4 tcffc41 tcffc40 cmprde4 cmpen4 read/write r r/w r r/w after reset 0 0 1 1 0 0 0 0 function tcff4 reversal 0: disable 1: enable tcff4 control 00: reversal 01: set 10: clear 11: don?t care double buffers 4 0: disable 1: enable compare 4 enable 0: disable 1: enable 7 6 5 4 3 2 1 0 bit symbol tcffen5 tcffc51 tcffc50 cmprde5 cmpen5 read/write r r/w r r/w after reset 0 0 1 1 0 0 0 0 function tcff5 reversal 0: disable 1: enable tcff5 control 00: reversal 01: set 10: clear 11: don?t care double buffers 5 0: disable 1: enable compare 5 enable 0: disable 1: enable 7 6 5 4 3 2 1 0 bit symbol tcffen6 tcffc61 tcffc60 cmprde6 cmpen6 read/write r r/w r r/w after reset 0 0 1 1 0 0 0 0 function tcff6 reversal 0: disable 1: enable tcff6 control 00: reversal 01: set 10: clear 11: don?t care double buffers 6 0: disable 1: enable compare 6 enable 0: disable 1: enable 7 6 5 4 3 2 1 0 bit symbol tcffen7 tcffc71 tcffc70 cmprde7 cmpen7 read/write r r/w r r/w after reset 0 0 1 1 0 0 0 0 function tcff7 reversal 0: disable 1: enable tcff7 control 00: reversal 01: set 10: clear 11: don?t care double buffers 7 0: disable 1: enable compare 7 enable 0: disable 1: enable cmpctl7 (fffff477h) cmpctl6 (fffff476h) cmpctl5 (fffff475h) cmpctl4 (fffff474h) : controls enable/disable of the compare match detection. : controls enable/disable of double buffers of the compare register. : controls f/f of the compare match output. : controls enable/disable of f/f reversal of the compare match output. (note) values read from bits 7, 3 and 2 of cmpctln are all "0." fig. 12.3.10 tmrc-related register
tmp19a64c1d tmp19a64(rev1.1) 12-18 tmrc compare control register (cmpctln) 7 6 5 4 3 2 1 0 bit symbol tcffen8 tcffc81 tcffc80 cmprde8 cmpen8 read/write r r/w r r/w after reset 0 0 1 1 0 0 0 0 function tcff8 reversal 0: disable 1: enable tcff8 control 00: reversal 01: set 10: clear 11: don?t care double buffers 8 0: disable 1: enable compare 8 enable 0: disable 1: enable 7 6 5 4 3 2 1 0 bit symbol tcffen9 tcffc91 tcffc90 cmprde9 cmpen9 read/write r r/w r r/w after reset 0 0 1 1 0 0 0 0 function tcff9 reversal 0: disable 1: enable tcff9 control 00: reversal 01: set 10: clear 11: don?t care double buffers 9 0: disable 1: enable compare 9 enable 0: disable 1: enable cmpctl9 (fffff479h) cmpctl8 (fffff478h) : controls enable/disable of the compare match detection. : controls enable/disable of double buffers of the compare register. : controls f/f of the compare match output. : controls enable/disable of f/f reversal of the compare match output. (note) values read from bits 7, 3 and 2 of cmpctln are all "0." fig. 12.3.11 tmrc -related registers
tmp19a64c1d tmp19a64(rev1.1) 12-19 tmrc compare register 0 (tccmp0) 7 6 5 4 3 2 1 0 bit symbol cmp007 cmp006 cmp005 cmp004 cmp003 cmp002 cmp001 cmp000 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 0 data (bits 7 through 0) 7 6 5 4 3 2 1 0 bit symbol cmp017 cmp016 cmp015 cmp014 cmp013 cmp012 cmp011 cmp010 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 0 data (bits 15 through 8) 7 6 5 4 3 2 1 0 bit symbol cmp027 cmp026 cmp025 cmp024 cmp023 cmp022 cmp021 cmp020 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 0 data (bits 23 through 16) 7 6 5 4 3 2 1 0 bit symbol cmp037 cmp036 cmp035 cmp034 cmp033 cmp032 cmp031 cmp030 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 0 data (bits 31 through 24) tccmp0ll (fffff440h) tccmp0lh (fffff441h) tccmp0hl (fffff442h) tccmp0hh (fffff443h) tmrc compare register 1 (tccmp1) 7 6 5 4 3 2 1 0 bit symbol cmp107 cmp106 cmp105 cmp104 cmp103 cmp102 cmp101 cmp100 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 1 data (bits 7 through 0) 7 6 5 4 3 2 1 0 bit symbol cmp117 cmp116 cmp115 cmp114 cmp113 cmp112 cmp111 cmp110 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 1 data (bits 15 through 8) 7 6 5 4 3 2 1 0 bit symbol cmp127 cmp126 cmp125 cmp124 cmp123 cmp122 cmp121 cmp120 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 1 data (bits 23 through 16) 7 6 5 4 3 2 1 0 bit symbol cmp137 cmp136 cmp135 cmp134 cmp133 cmp132 cmp131 cmp130 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 1 data (bits 31 through 24) tccmp1ll (fffff444h) tccmp1lh (fffff445h) tccmp1hl (fffff446h) tccmp1hh (fffff447h) fig. 12.3.12 tmrc-related registers
tmp19a64c1d tmp19a64(rev1.1) 12-20 tmrc compare register 2 (tccmp2) 7 6 5 4 3 2 1 0 bit symbol cmp207 cmp206 cmp205 cmp204 cmp203 cmp202 cmp201 cmp200 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 2 data (bits 7 through 0) 7 6 5 4 3 2 1 0 bit symbol cmp217 cmp216 cmp215 cmp214 cmp213 cmp212 cmp211 cmp210 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 2 data (bits 15 through 8) 7 6 5 4 3 2 1 0 bit symbol cmp227 cmp226 cmp225 cmp224 cmp223 cmp222 cmp221 cmp220 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 2 data (bits 23 through 16) 7 6 5 4 3 2 1 0 bit symbol cmp237 cmp236 cmp235 cmp234 cmp233 cmp232 cmp231 cmp230 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 2 data (bits 31 through 24) tccmp2ll (fffff448h) tccmp2lh (fffff449h) tccmp2hl (fffff44ah) tccmp2hh (fffff44bh) tmrc compare register 3 (tccmp3) 7 6 5 4 3 2 1 0 bit symbol cmp307 cmp306 cmp305 cmp304 cmp303 cmp302 cmp301 cmp300 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 3 data (bits 7 through 0) 7 6 5 4 3 2 1 0 bit symbol cmp317 cmp316 cmp315 cmp314 cmp313 cmp312 cmp311 cmp310 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 3 data (bits 15 through 8) 7 6 5 4 3 2 1 0 bit symbol cmp327 cmp326 cmp325 cmp324 cmp323 cmp322 cmp321 cmp320 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 3 data (bits 23 through 16) 7 6 5 4 3 2 1 0 bit symbol cmp337 cmp336 cmp335 cmp334 cmp333 cmp332 cmp331 cmp330 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 3 data (bits 31 through 24) tccmp3ll (fffff44ch) tccmp3lh (fffff44dh) tccmp3hl (fffff44eh) tccmp3hh (fffff44fh) fig. 12.3.13 tmrc-related registers
tmp19a64c1d tmp19a64(rev1.1) 12-21 tmrc compare register 4 (tccmp4) 7 6 5 4 3 2 1 0 bit symbol cmp407 cmp406 cmp405 cmp404 cmp403 cmp402 cmp401 cmp400 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 4 data (bits 7 through 0) 7 6 5 4 3 2 1 0 bit symbol cmp417 cmp416 cmp415 cmp414 cmp413 cmp412 cmp411 cmp410 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 4 data (bits 15 through 8) 7 6 5 4 3 2 1 0 bit symbol cmp427 cmp426 cmp425 cmp424 cmp423 cmp422 cmp421 cmp420 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 4 data (bits 23 through 16) 7 6 5 4 3 2 1 0 bit symbol cmp437 cmp436 cmp435 cmp434 cmp433 cmp432 cmp431 cmp430 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 4 data (bits 31 through 24) tccmp4ll (fffff450h) tccmp4lh (fffff451h) tccmp4hl (fffff452h) tccmp4hh (fffff453h) tmrc compare register 5 (tccmp5) 7 6 5 4 3 2 1 0 bit symbol cmp507 cmp506 cmp505 cmp504 cmp503 cmp502 cmp501 cmp500 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 5 data (bits 7 through 0) 7 6 5 4 3 2 1 0 bit symbol cmp517 cmp516 cmp515 cmp514 cmp513 cmp512 cmp511 cmp510 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 5 data (bits 15 through 8) 7 6 5 4 3 2 1 0 bit symbol cmp527 cmp526 cmp525 cmp524 cmp523 cmp522 cmp521 cmp520 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 5 data (bits 23 through 16) 7 6 5 4 3 2 1 0 bit symbol cmp537 cmp536 cmp535 cmp534 cmp533 cmp532 cmp531 cmp530 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 5 data (bits 31 through 24) tccmp5ll (fffff454h) tccmp5lh (fffff455h) tccmp5hl (fffff456h) tccmp5hh (fffff457h) fig. 12.3.14 tmrc-related registers
tmp19a64c1d tmp19a64(rev1.1) 12-22 tmrc compare register 6 (tccmp6) 7 6 5 4 3 2 1 0 bit symbol cmp607 cmp606 cmp605 cmp604 cmp603 cmp602 cmp601 cmp600 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 6 data (bits 7 through 0) 7 6 5 4 3 2 1 0 bit symbol cmp617 cmp616 cmp615 cmp614 cmp613 cmp612 cmp611 cmp610 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 6 data (bits 15 through 8) 7 6 5 4 3 2 1 0 bit symbol cmp627 cmp626 cmp625 cmp624 cmp623 cmp622 cmp621 cmp620 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 6 data (bits 23 through 16) 7 6 5 4 3 2 1 0 bit symbol cmp637 cmp636 cmp635 cmp634 cmp633 cmp632 cmp631 cmp630 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 6 data (bits 31 through 24) tccmp6ll (fffff458h) tccmp6lh (fffff459h) tccmp6hl (fffff45ah) tccmp6hh (fffff45bh) tmrc compare reg7 (tccmp7) 7 6 5 4 3 2 1 0 bit symbol cmp707 cmp706 cmp705 cmp704 cmp703 cmp702 cmp701 cmp700 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 7 data (bits 7 through 0) 7 6 5 4 3 2 1 0 bit symbol cmp717 cmp716 cmp715 cmp714 cmp713 cmp712 cmp711 cmp710 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 7 data (bits 15 through 8) 7 6 5 4 3 2 1 0 bit symbol cmp727 cmp726 cmp725 cmp724 cmp723 cmp722 cmp721 cmp720 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 7 data (bits 23 through 16) 7 6 5 4 3 2 1 0 bit symbol cmp737 cmp736 cmp735 cmp734 cmp733 cmp732 cmp731 cmp730 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 7 data (bits 31 through 24) tccmp7ll (fffff45ch) tccmp7lh (fffff45dh) tccmp7hl (fffff45eh) tccmp7hh (fffff45fh) fig. 12.3.15 tmrc-related registers
tmp19a64c1d tmp19a64(rev1.1) 12-23 tmrc compare register 8 (tccmp8) 7 6 5 4 3 2 1 0 bit symbol cmp807 cmp806 cmp805 cmp804 cmp803 cmp802 cmp801 cmp800 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 8 data (bits 7 through 0) 7 6 5 4 3 2 1 0 bit symbol cmp817 cmp816 cmp815 cmp814 cmp813 cmp812 cmp811 cmp810 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 8 data (bits 15 through 8) 7 6 5 4 3 2 1 0 bit symbol cmp827 cmp826 cmp825 cmp824 cmp823 cmp822 cmp821 cmp820 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 8 data (bits 23 through 16) 7 6 5 4 3 2 1 0 bit symbol cmp837 cmp836 cmp835 cmp834 cmp833 cmp832 cmp831 cmp830 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 8 data (bits 31 through 24) tccmp8ll (fffff460h) tccmp8lh (fffff461h) tccmp8hl (fffff462h) tccmp8hh (fffff463h) tmrc compare register 9 (tccmp9) 7 6 5 4 3 2 1 0 bit symbol cmp907 cmp906 cmp905 cmp904 cmp903 cmp902 cmp901 cmp900 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 9 data (bits 7 through 0) 7 6 5 4 3 2 1 0 bit symbol cmp917 cmp916 cmp915 cmp914 cmp913 cmp912 cmp911 cmp910 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 9 data (bits 15 through 8) 7 6 5 4 3 2 1 0 bit symbol cmp927 cmp926 cmp925 cmp924 cmp923 cmp922 cmp921 cmp920 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 9 data (bits 23 through 16) 7 6 5 4 3 2 1 0 bit symbol cmp937 cmp936 cmp935 cmp934 cmp933 cmp932 cmp931 cmp930 read/write r/w after reset 0 0 0 0 0 0 0 0 function compare register 9 data (bits 31 through 24) tccmp9ll (fffff464h) tccmp9lh (fffff465h) tccmp9hl (fffff466h) tccmp9hh (fffff467h) fig. 12.3.16 tmrc-related registers
tmp19a64c1d tmp19a64(rev1.1)- 13-1 13. serial channel (sio) 13.1 features this device has seven serial i/o channels: sio0 to sio6. each channel operates in either the uart mode (asynchronous communication) or the i/o interface mode (synchronous communication) which is selected by the user. i/o interface mode mode 0: this is the mode to send and receive i/o data and associated synchronization signals (sclk) to extend i/o. mode 1: tx/rx data length: 7 bits asynchronous (uart) mode: mode 2: tx/rx data length: 8 bits mode 3: tx/rx data length: 9 bits in the above modes 1 and 2, parity bits can be added. the mode 3 has a wakeup function in which the master controller can start up slave controllers via the serial link (multi-controller system). figure shows the block diagram of sio0. each channel consists of a prescaler, a serial clock genera tion circuit, a receive buffer and its control circuit, and a send buffer and its control circuit. each channel functions independently. as the sios 0 to 6 operate in the same way, only sio0 is described here. bit 0 1 2 3 456 start stop bit 0 1 2 3 456 start stop parity bit 0 1 2 3 456 bit 0 1 2 3 456 start stop start stop parity 77 7 bit 0 1 2 3 456 start 8 7 stop bit 0 1 2 3 456 start stop (wake-up) bit 8 7 if bit 8 =1, represents address (select code). if bit 8 =0, represents data. z mode 0 (i/o interface mode)/msb first transmission direction z mode 1 (7-bit uart mode) z mode 2 (8-bit uart mode) z mode 3 (9-bit uart mode) without parity with parity without parity with parity 0 bit 7 6 5 4 321 z mode 0 (i/o interface mode)/lsb first transmission direction 7 bit 0 1 2 3 456 fig. 13.1 data format
tmp19a64c1d tmp19a64(rev1.1)- 13-2 13.2 block diagram (channel 0) fig. 13.2.1 sio0 block diagram sc0mod0 uart mode prescaler tb4out (from tmrb4) 16 32 64 8 4 2 t4 t16 t64 t0 br0cr br0add selector selector selector divider t1 t4 t16 t64 br0cr f sys /2 i/o interface mode 2 selector i/o interface mode sc0cr sc0mod0 receive counter ( 16 only with uart) serial channel interrupt control transmit counter ( 16 only with uart) transmit control receive control receive buffer 1 (shift register) rb8 receive buffer 2 (sc0buf) error flag sc0mod0 tb8 send buffer 2 (sc0buf) interrupt request ( intrx0 ) internal data bus sc0cr txd0 (shares pc0) 0 cts (shares pc2) internal data bus interrupt request (inttx0) sc0mod0 rxd0 (shares pc1) sc0cr txdclk sc0mod0 parity control internal data bus serial clock generation circuit sclk0 input (shares pc2) sclk0 output (shares pc2) baud rate generator rxdclk send buffer 1 (shift register) sioclk br0cr fifo control fifo control 128 t1
tmp19a64c1d tmp19a64(rev1.1)- 13-3 13.3 operation of each circuit (channel 0) 13.3.1 prescaler the device includes a 7-bit prescaler to generate necessary clocks to drive sio0. the input clock t0 to the prescaler is selected by syscr of cg to provide the frequency of either fperiph/2, fperiph/4, fperiph/8, or fperiph/16. the clock frequency fperiph is either the clock "fgear," to be selected by syscr1 of cg, or the clock "fc" before it is divided by the clock gear. the prescaler becomes active on ly when the baud rate generator is sel ected for generating the serial transfer clock. table 13.3.1 lists the prescaler output clock resolution. table 13.3.1 clock resolution to the baud rate generator @fc = 54mhz prescaler output clock resolution clear peripheral clock clock gear value prescaler clock selection t1 t4 t16 t64 00(fperiph/16) fc/2 5 (0.6 s) fc/2 7 (2.4 s) fc/2 9 (9.5 s) fc/2 11 (37.9 s) 01(fperiph/8) fc/2 4 (0.3 s) fc/2 6 (1.2 s) fc/2 8 (4.7 s) fc/2 10 (19.0 s) 10(fperiph/4) fc/2 3 (0.15 s) fc/2 5 (0.6 s) fc/2 7 (2.4 s) fc/2 9 (9.5 s) 000(fc) 11(fperiph/2) fc/2 2 (0.07 s) fc/2 4 (0.3 s) fc/2 6 (1.2 s) fc/2 8 (4.7 s) 00(fperiph/16) fc/2 6 (1.2 s) fc/2 8 (4.7 s) fc/2 10 (19.0 s) fc/2 12 (75.9 s) 01(fperiph/8) fc/2 5 (0.6 s) fc/2 7 (2.4 s) fc/2 9 (9.5 s) fc/2 11 (37.9 s) 10(fperiph/4) fc/2 4 (0.3 s) fc/2 6 (1.2 s) fc/2 8 (4.7 s) fc/2 10 (19.0 s) 100(fc/2) 11(fperiph/2) fc/2 3 (0.15 s) fc/2 5 (0.6 s) fc/2 7 (2.4 s) fc/2 9 (9.5 s) 00(fperiph/16) fc/2 7 (2.4 s) fc/2 9 (9.5 s) fc/2 11 (37.9 s) fc/2 13 (152 s) 01(fperiph/8) fc/2 6 (1.2 s) fc/2 8 (4.7 s) fc/2 10 (19.0 s) fc/2 12 (75.9 s) 10(fperiph/4) fc/2 5 (0.6 s) fc/2 7 (2.4 s) fc/2 9 (9.5 s) fc/2 11 (37.9 s) 110(fc/4) 11(fperiph/2) fc/2 4 (0.3 s) fc/2 6 (1.2 s) fc/2 8 (4.7 s) fc/2 10 (19.0 s) 00(fperiph/16) fc/2 8 (4.7 s) fc/2 10 (19.0 s) fc/2 12 (75.9 s) fc/2 14 (303 s) 01(fperiph/8) fc/2 7 (2.4 s) fc/2 9 (9.5 s) fc/2 11 (37.9 s) fc/2 13 (152 s) 10(fperiph/4) fc/2 6 (1.2 s) fc/2 8 (4.7 s) fc/2 10 (19.0 s) fc/2 12 (75.9 s) 0 (fgear) 111(fc/8) 11(fperiph/2) fc/2 5 (0.6 s) fc/2 7 (2.4 s) fc/2 9 (9.5 s) fc/2 11 (37.9 s) 00(fperiph/16) fc/2 5 (0.6 s) fc/2 7 (2.4 s) fc/2 9 (9.5 s) fc/2 11 (37.9 s) 01(fperiph/8) fc/2 4 (0.3 s) fc/2 6 (1.2 s) fc/2 8 (4.7 s) fc/2 10 (19.0 s) 10(fperiph/4) fc/2 3 (0.15 s) fc/2 5 (0.6 s) fc/2 7 (2.4 s) fc/2 9 (9.5 s) 000(fc) 11(fperiph/2) fc/2 2 (0.07 s) fc/2 4 (0.3 s) fc/2 6 (1.2 s) fc/2 8 (4.7 s) 00(fperiph/16) fc/2 5 (0.6 s) fc/2 7 (2.4 s) fc/2 9 (9.5 s) fc/2 11 (37.9 s) 01(fperiph/8) fc/2 4 (0.3 s) fc/2 6 (1.2 s) fc/2 8 (4.7 s) fc/2 10 (19.0 s) 10(fperiph/4) fc/2 3 (0.15 s) fc/2 5 (0.6 s) fc/2 7 (2.4 s) fc/2 9 (9.5 s) 100(fc/2) 11(fperiph/2) ? fc/2 4 (0.3 s) fc/2 6 (1.2 s) fc/2 8 (4.7 s) 00(fperiph/16) fc/2 5 (0.6 s) fc/2 7 (2.4 s) fc/2 9 (9.5 s) fc/2 11 (37.9 s) 01(fperiph/8) fc/2 4 (0.3 s) fc/2 6 (1.2 s) fc/2 8 (4.7 s) fc/2 10 (19.0 s) 10(fperiph/4) ? fc/2 5 (0.6 s) fc/2 7 (2.4 s) fc/2 9 (9.5 s) 110(fc/4) 11(fperiph/2) ? fc/2 4 (0.3 s) fc/2 6 (1.2 s) fc/2 8 (4.7 s) 00(fperiph/16) fc/2 5 (0.6 s) fc/2 7 (2.4 s) fc/2 9 (9.5 s) fc/2 11 (37.9 s) 01(fperiph/8) ? fc/2 6 (1.2 s) fc/2 8 (4.7 s) fc/2 10 (19.0 s) 10(fperiph/4) ? fc/2 5 (0.6 s) fc/2 7 (2.4 s) fc/2 9 (9.5 s) 1 (fc) 111(fc/8) 11(fperiph/2) ? ? fc/2 6 (1.2 s) fc/2 8 (4.7 s) (note 1) the prescaler output clock tn must be selected so that the relationship " tn < fsys/2" is satisfied (so that tn is slower than fsys/2). (note 2) do not change the clock gear while sio is operating. (note 3) the horizontal lines in the above tabl e indicate that the setting is prohibited. the serial interface baud rate generato r uses four different clocks, i.e., t1, t4, t16 and t64, supplied from the prescaler output clock.
tmp19a64c1d tmp19a64(rev1.1)- 13-4 13.3.2 baud rate generator the baud rate generator generates transmit and receive cl ocks to determine the serial channel transfer rate. the baud rate generator uses either the t1, t4, t16 or t64 clock supplied from the 7-bit prescaler. this input clock selection is made by setting the baud rate setting register, br0cr . the baud rate generator contains built-in dividers for divide by 1, (n + m/16), and 16 where n is a number from 2 to 15 and m is a number from 0 to 15. the division is performed according to the settings of the baud rate control registers br0cr and br0add to determine the resulting transfer rate. ? uart mode: 1) if br0cr = 0, the setting of br0add is ignored and the counter is divided by n where n is the value set to br0cr . (n = 1 to 16). 2) if br0cr = 1, the n + (16 - k)/16 division function is enabled and the division is made by using the values n (set in br0cr ) and k (set in br0add). (n = 2 to 15, k = 1 to 15) note for the n values of 1 and 16, the above n+(16-k)/16 division function is inhibited. so, be sure to set br0cr to "0." ? i/o interface mode: the n + (16 - k)/16 division function cannot be used in the i/o interface mode. be sure to divide by n, by setting br0cr to "0." ? baud rate calculation to use the baud rate generator: 1) uart mode baud rate = ratio divide by the divided frequency clock input generator rated baud /16 the highest baud rate out of the baud rate generator is 843.75 kbps when t1 is 13.5 mhz. the fsys/2 frequency, obtained by dividing the system clock by 2, can be used as the serial clock. in this case, the highest baud rate will be 1.68 mbps when fsys is 54 mhz.
tmp19a64c1d tmp19a64(rev1.1)- 13-5 2) i/o interface mode baud rate = ratio divide by the divided frequency clock input generator rated baud /2 the highest baud rate will be generated when t1 is 13.5 mhz. if double buffering is used, the divide ratio can be set to "1" and the resulting output baud rate will be 6.75 mbps. (if double buffering is not used, the highest baud rate will be 3.375 mbps applying the divide ratio of "2.") ? example baud rate setting: 1) division by an integer (divide by n): selecting fc = 54 mhz for fperiph, setting t0 to fperiph/16, using the baud rate generator input clock t1, setting the divide ratio n (br0cr) = 4, and setting br0cr = "0," the resulting baud rate in the uart mode is calculated as follows: * clocking conditions system clock : high-speed (fc) high speed clock gear : x 1 (fc) prescaler clock : fperiph/16 (fperiph = fsys) baud rate = 4 fc/32 /16 = 54 10 6 / 32 / 4 / 16 = 26367 (bps) (note) the divide by (n + (16-k)/16) function is inhibited and thus br0add is ignored. 2) for divide by n + (16-k)/16 (only for uart mode): selecting fc = 54 mhz mhz for fperiph, setting t0 to fperiph/16, using the baud rate generator input clock t2, setting the divide ratio n (br0cr) = 4, setting k (br0add) = 14, and selecting br0 cr = 1, the resulting baud rate is calculated as follows: * clocking conditions system clock : high-speed (fc) high-speed clock gear : x 1 (fc) prescaler clock : fperiph/16 (fperiph = fsys) baud rate = 16 ) 4 1 (16 4 fc/32 ? + /16 = 54 10 6 / 32 / (4 + 16 2 ) / 16 = 25568 (bps)
tmp19a64c1d tmp19a64(rev1.1)- 13-6 also, an external clock input may be used as the serial clock. the resulting baud rate calculation is shown below: ? baud rate calculation for an external clock input: 1) uart mode baud rate = external clock input / 16 in this, the period of the external clock input must be equal to or greater than 4/fsys. if fsys = 54 mhz, the highest baud rate will be 54 / 4 / 16 = 844 (kbps). 2) i/o interface mode baud rate = external clock input when double buffering is used, it is necessa ry to satisfy the following relationship: external clock input period > 12/fsys therefore, when fsys = 54 mhz, the baud rate must be set to a rate lower than 54 / 12 = 4.5 (mbps). when double buffering is not used, it is necessary to satisfy the following relationship: external clock input period > 16/fsys therefore, when fsys = 54 mhz, the baud rate mu st be set to a rate lower than 54 / 16 = 3.375 (mbps). example baud rates for the uart mode are shown in table 13.3.2.1 and table 13.3.2.2.
tmp19a64c1d tmp19a64(rev1.1)- 13-7 table 13.3.2.1 selection of uart baud rate (use the baud rate generator with br0cr = 0) fc [mhz] input clock divide ratio n (set to br0cr ) t1 (fc/4) t4 (fc/16) t16 (fc/64) t64 (fc/256) 19.6608 1 307.200 76.800 19.200 4.800 2 153.600 38.400 9.600 2.400 4 76.800 19.200 4.800 1.200 8 38.400 9.600 2.400 0.600 0 19.200 4.800 1.200 0.300 24.576 5 76.800 19.200 4.800 1.200 a 38.400 9.600 2.400 0.600 29.4912 1 460.800 115.200 28.800 7.200 2 230.400 57.600 14.400 3.600 3 153.600 38.400 9.600 2.400 4 115.200 28.800 7.200 1.800 6 76.800 19.200 4.800 1.200 c 38.400 9.600 2.400 0.600 (note) this table shows the case where the system clock is set to fc, the clock gear is set to fc/1, and the prescaler clock is set to fperiph/2. table 13.3.2.2 selection of uart baud rate (the tmrb4 timer output (internal tb4out) is used with the timer input clock set to t0.) fc tb4rg0h/l 29.4912 mhz 24.576 mhz 24 mhz 19.6608 mhz 16 mhz 12.288 mhz 0001h 230.4 192 187.5 153.6 125 96 0002h 115.2 96 93.75 76.8 62.5 48 0003h 76.8 64 62.5 51.2 41.67 32 0004h 57.6 48 46.88 38.4 31.25 24 0005h 46.08 38.4 37.5 30.72 25 19.2 0006h 38.4 32 31.25 25.6 20.83 16 0008h 28.8 24 23.44 19.2 15.63 12 000ah 23.04 19.2 18.75 15.36 12.5 9.6 0010h 14.4 12 11.72 9.6 7.81 6 0014h 11.52 9.6 9.38 7.68 6.25 4.8 baud rate calculation to use the tmrb4 timer: transfer rate = 16 2 tb4reg 0 : rck1 syscr0 by selected frequency clock > < p (note 1) in the i/o interface mode, the tmrb4 timer output signal cannot be used internally as the transfer clock. (note 2) this table shows the case where the system clock is set to fc, the clock gear is set to fc/1, and the prescaler clock is set to fperiph/4. unit (kbps) unit (kbps) ( when in p ut clock to the timer tmrb4 is t0 )
tmp19a64c1d tmp19a64(rev1.1)- 13-8 13.3.3 serial clock generation circuit this circuit generates basic transmit and receive clocks. ? i/o interface mode: in the sclk output mode with the sc0cr serial control register set to "0," the output of the previously mentioned baud rate generator is divided by 2 to generate the basic clock. in the sclk input mode with sc0cr set to "1," rising and falling edges are detected according to the sc0cr setting to generate the basic clock. ? asynchronous (uart) mode: according to the settings of the serial control m ode register sc0mod0 , either the clock from the baud rate register, the system clock (f sys /2), the internal output signal of the tmrb4 timer, or the external clock (sclko pin) is selected to generate the basic clock, sioclk. 13.3.4 receive counter the receive counter is a 4-bit binary counter used in the asynchronous (uart) m ode and is up-counted by sioclk. sixteen sioclk clock pulses are used in rece iving a single data bit while the data symbol is sampled at the seventh, eighth, and ninth pulses. from these three samples, majority logic is applied to decide the received data. 13.3.4 receive control unit ? i/o interface mode: in the sclk output mode with sc0cr set to "0," the rxd0 pin is sampled on the rising edge of the shift clock output to the sclk0 pin. in the sclk input mode with sc0cr set to "1," the serial receive data rxd0 pin is sampled on the rising or falling edge of sclk input depending on the sc0cr setting. ? asynchronous (uart) mode: the receive control unit has a start bit detection ci rcuit, which is used to initiate receive operation when a normal start bit is detected. 13.3.5 receive buffer the receive buffer is of a dual structure to prevent ove rrun errors. the first receive buffer (a shift register) stores the received data bit-by-bit. when a complete set of bits have been stored, they are moved to the second receive buffer (sc0buf). at the same time, th e receive buffer full flag (sc0mod2 "rbfll") is set to "1" to indicate that valid data is stored in the second receive buffer. however, if the receive fifo is set enabled, the receive data is moved to the recei ve fifo and this flag is immediately cleared. if the receive fifo has been disabled (scofc nf = 0 and sc0mod1=01), the intrx0 interrupt is generated at the same time . if the receive fifo has been enabled (scnfcnf = 1 and sc0mod1=01/ 11), an interrupt will be generated according to the sc0rfc setting. the cpu will read the data from either the second receive buffer (sc0 buf) or from the receive fifo (the address is the same as that of the receive buffer). if the receive fifo has not been enabled, the receive buffer full flag sc0mod2 is cleared to "0" by the read operation. the next data received can be stored in the first receive buffer even if the cpu ha s not read the previous data from the second receive
tmp19a64c1d tmp19a64(rev1.1)- 13-9 buffer (sc0buf) or the receive fifo. if sclk is set to generate clock output in the i/o interface mode, the double buffer control bit sc0mod2 can be programmed to enable or disable th e operation of the second receive buffer (scobuf). by disabling the second receive buffer (i.e., the doubl e buffer function) and also disabling the receive fifo (scofcnf = 0 and = 01), handshaking with the other side of communication can be enabled and the sclk output stops each time one fram e of data is transferred. in this setting, the cpu reads data from the first receive buffer. by the r ead operation of cpu, the sclk output resumes. if the second receive buffer (i.e., do uble buffering) is enabled but the receive fifo is not enabled, the sclk output is stopped when the first receive data is moved from the first receive buffer to the second receive buffer and the next data is stored in the firs t buffer filling both buffers with valid data. when the second receive buffer is read, the data of the first recei ve buffer is moved to the second receive buffer and the sclk output is resumed upon generation of the recei ve interrupt intrx. theref ore, no buffer overrun error will be caused in the i/o interface sclk output mode regardless of the setting of the double buffer control bit sc0mod2 . if the second receive buffer (double buffering) is enabled and the receive fifo is also enabled (scnfcnf = 1 and = 01/11), the sclk outpu t will be stopped when th e receive fifo is full (according to the setting of scofncf ) and both the first and second receive buffers contain valid data. also in this case, if scofcnf has be en set to "1," the receive control bit rxe will be automatically cleared upon suspension of the sclk output. if it is set to "0," automatic clearing will not be performed. (note) in this mode, the sc0cr flag is insignificant and the operation is undefined. therefore, before switching from the sclk output mode to another mode, the sc0cr register must be read to initialize this flag. in other operating modes, the operation of the second receive buffer is always valid, thus improving the performance of continuou s data transfer. if the receive fifo is not enabled, an overrun error occurs when the data in the second receive buffer (sc0buf) has not been read before the first receive buffer is full with the next receive data. if an overrun erro r occurs, data in the first receive bu ffer will be lost while data in the second receive buffer and the contents of sc0cr remain intact. if the receive fifo is enabled, the fifo must be read before the fifo is full and the second r eceive buffer is written by the next data through the first buffer. otherwise, an overrun error will be generated and the receive fi fo overrun error flag will be set. even in this case, the data al ready in the receive fifo remains intact. the parity bit to be added in the 8-bit uart mode as well as the most significant bit in the 9-bit uart mode will be stored in sc0cr . in the 9-bit uart mode, the slave controller can be operated in the wake-up mode by setting the wake-up function sc0mod0 to "1." in this case, the in terrupt intrx0 will be generated only when sc0cr is set to "1."
tmp19a64c1d tmp19a64(rev1.1)- 13-10 13.3.6 receive fifo buffer in addition to the double bu ffer function already described, data may be stored using the receive fifo buffer. by setting of the sc0fcnf register and of the sc0mod1 register, the 4- byte receive buffer can be enabled. also, in the uart mode or i/o interface mode, data may be stored up to a predefined fill level. when the r eceive fifo buffer is to be used, be sure to enable the double buffer function. if data with parity bit is to be received in the uart mode, parity check must be performed each time a data frame is received. 13.3.7 receive fifo operation c i/o interface mode with sclk output: the following example describes the case a 4-byte da ta stream is received in the half duplex mode: sc0rfc<7:6>=01: clears receive fifo and se ts the condition of interrupt generation. sc0rfc<1:0>=00: sets the interrupt to be generated at fill level 4. sc0fcnf <1:0>=10111: automatically inhibits con tinued reception after reaching the fill level. the number of bytes to be used in the receive fifo is the same as the interrupt generation fill level. in this condition, 4-byte data reception may be initiated by setting the half duplex transmission mode and writing "1" to the rxe bit. after receiving 4 by tes, the rxe bit is automatically cleared and the receive operation is stopped (sclk is stopped). fig. 13.3.7.1 receive fifo operation receive buffer 1 rx fifo receive buffer 2 1 byte 2 byte 3 byte 4 byte 1 byte 1 byte 1 byte 1 byte 2 byte 2 byte 2 byte 2 byte 1 byte 3 byte 3 byte 3 byte 4 byte 4 byte rbfll rxe receive interrupt
tmp19a64c1d tmp19a64(rev1.1)- 13-11 d i/o interface mode with sclk input: the following example describes the case a 10-byte data stream is received: sc0rfc <7:6> = 10: clears receive fifo and sets the condition of interrupt generation sc0rfc <1:0> = 00: sets the interrupt to be generated at fill level 4. sc0fcnf <1:0> = 10101: automatically allows con tinued reception after reaching the fill level. the number of bytes to be used in the receive fifo is the maximum allowable number. in this condition, 4-byte data reception can be in itiated along with the input clock by setting the half duplex transmission mode and writing "1" to the rxe b it. when the 4-byte data reception is completed, the receive fifo interrupt will be generated. note that preparation for the next data reception can be managed in this setting, i.e., the next 4-byte data can be received before data is fully read from the fifo. fig. 13.3.7.2 receive fifo operation receive buffer 1 rx fifo receive buffer 2 1 byte 2 byte 3 byte 4 byte 1 byte 1 byte 1 byte 1 byte 2 byte 2 byte 2 byte 2 byte 1 byte 3 byte 3 byte 3 byte 4 byte 4 byte rbfll rxe receive interrupt
tmp19a64c1d tmp19a64(rev1.1)- 13-12 13.3.8 transmit counter the transmit counter is a 4-bit binary counter used in the asynchronous communication (uart) mode. it is counted by sioclk as in the case of the receive counter and generates a transmit clock (txdclk) on every 16th clock pulse. fig. 13.3.8.1 transmit clock generation 13.3.9 transmit control unit ? i/o interface mode: in the sclk output mode with sc0cr set to "0," each bit of data in the send buffer is output to the txd0 pin on the rising edge of the shift clock output from the sclk0 pin. in the sclk input mode with sc 0cr set to "1," each bit of data in the send buffer is output to the txd0 pin on the rising or falling edge of the input sclk signal according to the sc0cr setting. ? asynchronous (uart) mode: when the cpu writes data to the send buffer, data transmission is initiated on the rising edge of the next txdclk and the transmit shift clock (txdsft) is also generated. sioclk txdclk 15 16 12 4 5 67 8 910 11 12 13 14 15 16 3 1 2
tmp19a64c1d tmp19a64(rev1.1)- 13-13 ? handshake function the cts pin enables frame by frame data transmission so that overrun errors can be prevented. this function can be enabled or disabled by sc0mod0 . when the cts pin is set to the "h" level, the current data transmission can be completed but the next data transmission is suspended until the cts pin returns to the "l" level. however in this case, the inttx0 interrupt is generated, the next transmit data is requested to the cpu, data is written to the send buffer, and it waits until it is ready to transmit data. although no rts pin is provided, a handshake control function can be easily implemented by assigning a port for the rts function. by setting the port to "h" level upon completion of data reception (in the receive interrupt routine), the tr ansmit side can be requested to suspend data transmission. fig. 13.3.9.1 handshake function (note) c if the cts signal is set to "h" during transmissi on, the next data transmission is suspended after the current transmission is completed. d data transmission starts on the first falling edge of the txdclk clock after cts is set to "l." fig. 13.3.9.2 cts (clear to send) signal timing rxd rts (any port) receive side transmit side txd cts cts c d 13 14 15 16 1 2 3 14 15 16 1 2 3 sioclk txdclk txd bit 0 start bit transmission is suspended during this period data write timing to send buffer or shift register
tmp19a64c1d tmp19a64(rev1.1)- 13-14 13.3.10 transmit buffer the send buffer (sc0buf) is in a dual structure. the double buffering function may be enabled or disabled by setting the double buffer control bit in serial mode control register 2 (sc0mod2). if double buffering is enabled, data written to send buffer 2 (scobuf) is moved to send buffer 1 (shift register). if the transmit fifo has been disabled (scofcnf = 0 or 1 and = 01), the inttx interrupt is generated at the same time and the send buffer empty flag of sc0mod2 is set to "1." this flag indicates that send buffer 2 is now em pty and that the next transmit data can be written. when the next data is written to send buffer 2, the flag is cleared to "0." if the transmit fifo has been enabled (scnfcnf = 1 and = 10/11), any data in the transmit fifo is moved to the send buffer 2 and flag is immediately cleared to "0." the cpu writes data to send buffer 2 or to the transmit fifo. if the transmit fifo is disabled in the i/o interface sclk input mode and if no data is set in send buffer 2 before the next frame clock input, which occurs upon completion of data transmission from send buffer 1, an under-run error occurs and a serial control regist er (sc0cr) parity/under-run flag is set. if the transmit fifo is enabled in the i/o interface sclk input mode, when data transmission from send buffer 1 is completed, the send buffer 2 data is move d to send buffer 1 and any data in transmit fifo is moved to send buffer 2 at the same time. if the transmit fifo is disabled in the i/o interf ace sclk output mode, when data in send buffer 2 is moved to send buffer 1 and the data transmission is completed, the sclk output stops. so, no under-run errors can be generated. if the transmit fifo is enabled in the i/o interf ace sclk output mode, the sclk output stops upon completion of data transmission from send buffer 1 if there is no valid data in the transmit fifo. note) in the i/o interface sc lk output mode, the sc0cr flag is insignificant. in this case, the operation is undefined. therefore, to switch from the sclk output mode to another mode, sc0cr must be r ead in advance to initialize the flag. if double buffering is disabled, the cpu writes data only to send buffer 1 and the transmit interrupt inttx is generated upon completion of data transmission. if handshaking with the other side is necessary, set the double buffer control b it to "0" (disable) to disable send buffer 2; any setting for the transmit fifo should not be performed.
tmp19a64c1d tmp19a64(rev1.1)- 13-15 13.3.11 transmit fifo buffer in addition to the double buffer function already described, data may be stored using the transmit fifo buffer. by setting of the sc0fcnf register and of the sc0mod1 register, the 4- byte send buffer can be enabled. in the uart mode or i/o interface mode, up to 4 bytes of data may be stored. if data is to be transmitted with a parity bit in the uart mode, parity check must be performed on the receive side each time a data frame is received. 13.3.12 transmit fifo operation c i/o interface mode with sclk output (normal mode): the following example describes the case a 4-byte data stream is transmitted: sc0tfc <7:6> = 01: clears transmit fifo and sets the condition of interrupt generation sc0tfc <1:0> = 00: sets the interrupt to be generated at fill level 0. sc0fcnf <1:0> = 01011: inhibits continued transmission after reaching the fill level. in this condition, data transmission can be initiated by setting the transfer mode to half duplex, writing 4 bytes of data to the transmit fifo, and setting the bit to "1." when the last transmit data is moved to the send buffer, the transmit fifo interrupt is generated. when transmission of the last data is completed, the clock is stopped and the transmission sequence is terminated. fig. 13.3.12.1 transmit fifo operation send buffer 1 tx fifo send buffer 2 tbemp inttx0 data 6 data 6 data 6 txe data 5 data 4 data 3 data 2 data 1 data 5 data 4 data 3 data 2 data 5 data 4 data 3 data 6 data 5 data 4 data 6 data 5
tmp19a64c1d tmp19a64(rev1.1)- 13-16 d i/o interface mode with sclk input (normal mode): the following example describes the case a 4-byte data stream is transmitted: sc0tfc <1:0> = 01: clears the transmit fifo and sets the condition of interrupt generation. sc0tfc <7:2> = 000000: sets the interrupt to be generated at fill level 0. sc0fcnf <4:0> = 01001: allows continued transmission afte r reaching the fill level. in this condition, data transmissi on can be initiated along with the in put clock by setting the transfer mode to half duplex, writing 4 bytes of data to the transmit fifo, and setting the bit to "1." when the last transmit data is moved to the send buffer, the transmit fifo interrupt is generated fig. 13.3.12.2 transmit fifo operation send buffer 1 tx fifo send buffer 2 tbemp inttx0 data 6 data 6 data 6 txe data 5 data 4 data 3 data 2 data 1 data 5 data 4 data 3 data 2 data 5 data 4 data 3 data 6 data 5 data 4 data 6 data 5
tmp19a64c1d tmp19a64(rev1.1)- 13-17 13.3.13 parity control circuit if the parity addition bit of the serial control regist er sc0cr is set to "1," data is sent with the parity bit. note that the parity bit may be used only in the 7- or 8-bit uart mode. the bit of sc0cr selects either even or odd parity. upon data transmission, the parity control circuit auto matically generates the parity with the data written to the send buffer (sc0buf). after data transmission is co mplete, the parity bit will be stored in sc0buf bit 7 in the 7-bit uart mode and in bit 7 in the serial mode control register sc0mod in the 8-bit uart mode. the and settings must be completed before data is written to the send buffer. upon data reception, the parity bit for the received data is automatically generated while the data is shifted to receive buffer 1 and moved to receive buffer 2 (sc0 buf). in the 7-bit uart m ode, the parity generated is compared with the parity stored in sc0buf , while in the 8-bit uart mode, it is compared with the bit 7 of the sc0cr register. if there is an y difference, a parity error occurs and the flag of the sc0cr register is set. in the i/o interface mode, the sc0cr flag functions as an under-run error flag, not as a parity flag. 13.3.14 error flag three error flags are provided to in crease the reliability of received data. 1. overrun error : bit 4 of the serial control register sc0cr in both uart and i/o interface modes, this bit is se t to "1" when an error is generated by completing the reception of the next frame receive data before the receive buffer has been read. if the receive fifo is enabled, the received data is automatically move d to the receive fifo and no overrun error will be generated until the receive fifo is fu ll (or until the usable bytes are fully occupied). this flag is set to "0" when it is read. in the i/o inte rface sclk output mode, no overrun error is generated and therefore, this flag is inoperative and the operation is undefined. 2. parity error/under-run error : bit 3 of the sc0cr register in the uart mode, this bit is set to "1" when a par ity error is generated. a parity error is generated when the parity generated from the r eceived data is different from the parity received. this flag is set to "0" when it is read. in the i/o interface mode, this bit indicates an under -run error. when the do uble buffer control bit of the serial mode control register sc0mod2 is set to "1" in the sclk input mode, if no data is set to the transmit double buffer before the next data transfer clock after completing the transmission from the transmit shift register, this error flag is set to "1" indicating an under-run error. if the transmit fifo is enabled, any data content in the transmit fifo will be moved to the buffer. when the transmit fifo and the double buffer are both empt y, an under-run error will be generated. because no under-run errors can be generated in the sclk output mode, this flag is inoperative and the operation is undefined. if send buffer 2 is disabled, the under-run flag will not be set. this flag is set to "0" when it is read.
tmp19a64c1d tmp19a64(rev1.1)- 13-18 3. framing error : bit 2 of the sc0cr register in the uart mode, this bit is set to "1" when a framing error is generated. this flag is set to "0" when it is read. a framing error is generate d if the corresponding stop bit is determined to be "0" by sampling the bit at around the center. regardless of the (stop bit length) setting of the serial mode control register 2, sc0mod2, the stop bit status is determined by only 1 bit on the receive side. operation mode error flag function oerr overrun error flag perr parity error flag uart ferr framing error flag oerr overrun error flag underrun error flag (wbuf = 1) perr fixed to 0 (wbuf = 0) i/o interface (sclk input) ferr fixed to 0 oerr operation undefined perr operation undefined i/o interface (sclk output) ferr fixed to 0
tmp19a64c1d tmp19a64(rev1.1)- 13-19 13.3.15 direction of data transfer in the i/o interface mode, the direction of data tran sfer can be switched between "msb first" and "lsb first" by the data transfer direction setting bit of the sc0mod2 serial mode control register 2. don't switch the direction when data is being transferred. 13.3.16 stop bit length in the uart mode transmission, the stop bit length can be set to either 1 or 2 bits by bit 4 of the sc0mod2 register. 13.3.17 status flag if the double buffer function is enabled (sc0mod2 = "1"), the bit 6 flag of the sc0mod2 register indicates the conditio n of receive buffer full. when one frame of data has been received and transferred from buffer 1 to buffer 2, this bit is set to "1" to show that buffer 2 is full (data is stored in buffer 2). when the receive buffer is read by cpu/dmac, it is cleared to "0." if is set to "0," this bit is insignificant and must not be used as a status flag. when double buffering is enabled (sc0mod2 = "1"), the bit 7 flag of the sc0mod2 register indicates that send buffer 2 is empty. when data is moved from send buffer 2 to send buffer 1 (shift register), this bit is set to "1" indicating that send buffer 2 is now empty. when data is set to the send buffer by cpu/dmac, the bit is cleared to "0." if is set to "0," this bit is insignificant and must not be used as a status flag. 13.3.18 configurations of send/receive buffers = 0 = 1 transmit buffer single double uart receive buffer double double transmit buffer single double i/o interface (sclk input) receive buffer double double transmit buffer single double i/o interface (sclk output) receive buffer single double
tmp19a64c1d tmp19a64(rev1.1)- 13-20 13.3.19 signal generation timing c uart mode: receive side mode 9-bit 8-bit with parity 8-bit, 7-bit, and 7-bit with parity interrupt generation timing around the center of the 1st stop bit around the center of the 1st stop bit around the center of the 1st stop bit framing error timing around the center of the stop bit around the center of the stop bit around the center of the stop bit parity error generation timing ? around the center of the last (parity) bit around the center of the last (parity) bit overrun error generation timing around the center of the stop bit around the center of the stop bit around the center of the stop bit transmit side mode 9-bit 8-bit with parity 8-bit, 7-bit, and 7-bit with parity interrupt generation timing ( = 0) just before the stop bit is sent just before the stop bit is sent just before the stop bit is sent interrupt generation timing ( = 1) immediately after data is moved to send buffer 1 (just before start bit transmission) immediately after data is moved to send buffer 1 (just before start bit transmission) immediately after data is moved to send buffer 1 (just before start bit transmission) d i/o interface mode: receive side sclk output mode immediately after the rising edge of the last sclk interrupt generation timing (wbuf = 0) sclk input mode immediately after the rising or falling edge of the last sclk (for rising or falling edge mode, respectively) sclk output mode immediately after the rising edge of the last sclk (just after data transfer to receive buffer 2) or just after receive buffer 2 is read interrupt generation timing (wbuf = 1) sclk input mode immediately after the rising edge or falling edge of the last sclk depending on the rising or falling edge triggering mode, respectively (right after data is moved to receive buffer 2) overrun error generation timing sclk input mode immediately after the rising or falling edge of the last sclk (for rising or falling edge mode, respectively) transmit side sclk output mode immediately after the rising edge of the last sclk interrupt generation timing (wbuf = 0) sclk input mode immediately after the rising or falling edge of the last sclk (for rising or falling edge mode, respectively) sclk output mode immediately after the rising edge of the last sclk or just after data is moved to send buffer 1 interrupt generation timing (wbuf = 1) sclk input mode immediately after the rising or falling edge of the last sclk (for the rising or falling edge mode, resp ectively) or just after data is moved to send buffer 1 under-run error generation timing sclk input mode immediately after the falling or rising edge of the next sclk (for the rising or falling edge tr iggering mode, respectively) note 1) do not modify any control register when data is being sent or received (in a state ready to send or receive). note 2) do not stop the receive operation (by setting sc0mod0 = "0") when data is being received. note 3) do not stop the transmit operation (by setting sc0mod1 = "0") when data is being transmitted.
tmp19a64c1d tmp19a64(rev1.1)- 13-21 13.4 register description (only for channel 0) 7 6 5 4 3 2 1 0 bit symbol tb8 ctse rxe wu sm1 sm0 sc1 sc0 read/write r/w after reset 0 0 0 0 0 0 0 0 function send data bit 8 handshake function control 0: disables cts 1: enables cts receive control 0: disables reception 1: enables reception wake-up function 0: disable 1: enable serial transfer mode 00: i/o interface mode 01: 7-bit length uart mode 10: 8-bit length uart mode 11: 9-bit length uart mode serial transfer clock (for uart) 00: timer tb4out 01: baud rate generator 10: internal f sys /2 clock 11: external clock (sclk0 input) note) with set to "0," set each mode register (sc0mod0, sc0mod1 and sc0mod2). then set to "1." fig. 13.4.1 serial mode control r egister 0 (for sio0, sc0mod0) sc0mod0 (0xffff_f262) note) in the i/o interface mode, the serial control register (sc0cr) is used for clock selection. wakeup function 9-bit uart other mode 0 interrupt when received 1 interrupt at rb8=1 don't care 0 disable (transmission is always allowed) 1 enable handshake function ( cts pin) enable
tmp19a64c1d tmp19a64(rev1.1)- 13-22 7 6 5 4 3 2 1 0 bit symbol i2s0 fdpx1 fdpx0 txe sint2 sint1 sint0 read/write r/w after reset 0 0 0 0 0 0 0 0 function idle 0: stop 1: start transfer mode setting 00: transfer prohibited 01: half duplex (rx) 10: half duplex (tx) 11: full duplex transmit control 0: disable 1: enable interval time of continuous transmission 000: none 100: 8sclk 001: 1sclk 101:16sclk 010: 2sclk 110: 32sclk 011: 4sclk 111: 64sclk write "0." fig. 13.4.2 serial mode control r egister 1 (for sio0, sc0mod1) : specifies the interval time of continuous tr ansmission when double buffering or fifo is enabled in the i/o interface mode. this parameter is inva lid for the uart mode or when an external clock is used. : this bit enables transmission and is valid for all the transfer modes. if disabled while transmission is in progress, transmission is inhi bited only after the curr ent frame of data is completed for transmission. : configures the tr ansfer mode in the i/o interface mode. also configures the fifo if it is enabled. in the uart mode, it is used only to specify the fifo configuration. : specifies the idle mode operation. sc0mod1 (0xffff_f265)
tmp19a64c1d tmp19a64(rev1.1)- 13-23 7 6 5 4 3 2 1 0 bit symbol tbemp rbfll txrun sblen drchg wbuf swrst1 swrst0 read/write r/w w w after reset 1 0 0 0 0 0 0 0 function send buffer empty flag 0: full 1: empty receive buffer full flag 0: empty 1: full in transmissi on flag 0: stop 1: start stop bit 0: 1-bit 1: 2-bit setting transfer direction 0: lsb first 1: msb first w-buffer 0: disable 1: enable soft reset overwrite "01" on "10" to reset : overwriting "01" in place of "10" generates a software reset. when this software reset is executed, the mode register parameters sc0mod0 , sc0mod1, sc0mod2 , , and , contro l register parameters sc0cr , , and , and their internal circuits are initialized. : this parameter enables or disables the send /receive buffers to send (in both sclk output/input modes) and receive (in sclk outp ut mode) data in the i/o interface mode and to transmit data in the uart. in all other modes, double buff ering is enabled regardless of the setting. : specifies the direction of da ta transfer in the i/o interface mode. in the uart mode, it is fixed to lsb first. : this is a status flag to show that data transmission is in progress. when this bit is set to "1," it indicates that da ta transmission operation is in progress. if it is "0," the bit 7 is set to "1" to indicate that the transmission has been fully completed and the same is set to "0" to indicat e that the send buffer contains some data waiting for the next transmission. : this is a flag to show that the receive d ouble buffers are full. when a receive operation is completed and received data is moved from the receive shift register to the receive double buffers, this bit changes to "1" while reading this bit changes it to "0." if double buffering is disabled, this flag is insignificant. : this flag shows that the send double buffers are empty. when data in the send double buffers is moved to the send shift register and the double bu ffers are empty, this bit is set to "1." writing data again to the double buffers sets this bit to "0." if double buffering is disabled, this flag is insignificant. : this specifies the length of stop bit transmission in the ua rt mode. on the receive side, the decision is made using only a single bit regardless of the setting. (note) while data transmission is in progress, any software reset operation must be executed twice in succession. fig. 13.4.3 serial mode control register sc0mod2 (0xffff_f266)
tmp19a64c1d tmp19a64(rev1.1)- 13-24 7 6 5 4 3 2 1 0 bit symbol rb8 even pe oerr perr ferr sclks ioc read/write r r/w r (cleared to "0" when read) r/w after reset 0 0 0 0 0 0 0 0 0: normal operation 1: error function receive data bit 8 parity 0: odd 1: even add parity 0: disable 1: enable overrun parity/ under-run framing 0: sclk0 1: sclk0 0: baud rate generator 1: sclk0 pin input (note) any error flag is cleared when read. fig. 13.4.4 serial control r egister (for sio0, sc0cr) sc0cr (0xffff_f261) i/o interface input clock selection framing error flag parity error/under-run error flag overrun error flag edge selection for sclk0 input operation cleared to "0" when read add/check even parity 0 odd parity 1 even parity 0 baud rate generator 1 sclk0 pin input 0 data send/receive at rising edges of sclk0 1 data send/receive at falling edges of sclk0
tmp19a64c1d tmp19a64(rev1.1)- 13-25 7 6 5 4 3 2 1 0 bit symbol br0adde br0ck1 br0ck0 br0s3 br0s2 br0s1 br0s0 read/write r/w after reset 0 0 0 0 0 0 0 0 function write "0." n+(16-k)/16 divider function 0: disable 1: enable 00: t1 01: t4 10: t16 11: t64 divide ratio "n" select input clock to the baud rate generator 00 internal clock t1 01 internal clock t4 10 internal clock t16 11 internal clock t64 7 6 5 4 3 2 1 0 bit symbol br0k3 br0k2 br0k1 br0k0 read/write r r/w after reset 0 0 0 0 0 0 0 0 function specify k for the "n + (16 - k)/16" division setting divide ratio of the baud rate generator br0cr = 1 br0cr = 0 br0cr br0add 0000 (n = 16) 0001 (n = 1) 0010 (n = 2) 1111 (n = 15) 0001 (n = 1) (only uart) 1111 (n = 15) 0000 (n = 16) 0000 disable disable 0001 (k = 1) 1111 (k = 15) disable n + 16 k) (16 ? division divide by n (note 1) in the uart mode, the division ratio "1" of the baud rate generator can be specified only when the "n + (16 - k)/16" division function is not used. in the i/o interface mode, the division ratio "1" of the baud rate generator can be specified only when double buffering is used. (note 2) to use the "n + (16 - k)/16" division function, be sure to set br0cr to "1" after setting the k value (k = 1 to 15) to br0add . however, don't use the "n + (16 - k)/16" division function when br0cr is set to either "0000" or "0001" (n = 16 or 1). (note 3) the "n + (16 - k)/16" division function can only be used in the uart mode. in the i/o interface mode, the "n + (16 - k)/16" division function must be disabled (prohibited) by setting br0cr to "0." fig. 13.4.5 baud rate generator c ontrol (for sio0, br0cr, br0add) br0cr (0xffff_f263) br0add (0xffff_f264) ~ ~ ~ ~
tmp19a64c1d tmp19a64(rev1.1)- 13-26 7 6 5 4 3 2 1 0 bit symbol tb7/rb7 tb6/rb6 tb5/rb5 tb 4/rb4 tb3/rb3 tb2/rb2 tb1/rb1 tb0/rb0 read/write r/w after reset 0 0 0 0 0 0 0 0 function tb7 to tb0: send buffer + fifo rb7 to rb0: receive buffer + fifo note: hscbuf works as a send buffer for wr operation and as a receive buffer for rd operation. fig. 13.4.6 sio0 send/receive buffer register 7 6 5 4 3 2 1 0 bit symbol rfst tfie rfie rxtxcnt cnfg read/write r/w after reset 0 0 0 0 0 0 0 0 function be sure to write "000." bytes used in rx fifo 0: maximum 1: same as fill level of rx fifo tx interrupt for tx fifo 0: disable 1: enable rx interrupt for rx fifo 0: disable 1: enable automatic disable of rxe/txe 0: none 1: auto disable fifo enable 0: disable 1: enable : if enabled, the scomod1 settin g automatically configures fifo as follows: = 01 (half duplex rx) ---- 4-byte rx fifo = 10 (half duplex tx) ---- 4-byte tx fifo = 11 (full duplex) --------- 2-byte rx fifo + 2-byte tx fifo :0 the function to automatically disable rxe/txe bits is disabled. 1: if enabled, the scomod1 is used to set as follows: = 01 (half duplex rx) ------ when th e rx fifo is filled up to the specified number of valid bytes, rxe is automatically set to "0" to inhibit further reception. = 10 (half duplex tx) ------ when the tx fifo is empty, txe is automatically set to "0" to inhibit further transmission. = 11 (full duplex) ---- ------- when either of the above two conditions is satisfied, txe/rxe are automatically set to "0" to inhibit further transmission and reception. : when rx fifo is enabled, receive interrupts are enabled or disabled by this parameter. : when tx fifo is enabled, transmit interr upts are enabled or disabled by this parameter. : when rx fifo is enabled, the number of rx fifo bytes to be used is selected. 0: the maximum number of bytes of the fifo configured 4 bytes when = 01 (half duplex rx) and 2 bytes for = 11 (full duplex) 1: same as the fill level for receive interr upt generation specified by sc0rfc . (note 1) regarding tx fifo, the maximum number of bytes being configured is always available. the available number of bytes is the bytes already written to the tx fifo. fig. 13.4.7 fifo conf iguration register sc0fcnf (0xffff_f26c) sc0buf (0xffff_f260)
tmp19a64c1d tmp19a64(rev1.1)- 13-27 7 6 5 4 3 2 1 0 bit symbol rfcs rfis ril1 ril0 read/write w r/w r r/w after reset 0 0 0 0 0 0 0 0 function clear rx fifo 1: clear always reads "0." select interrupt generation condition fifo fill level to generate rx interrupts 00: 4 bytes (2 bytes if full duplex) 01: 1byte 10: 2byte 11: 3byte note: ril1 is ignored when fdpx1:0 = 11 (full duplex) 0: an interrupt is generated when the specified fill level is reached. 1: an interrupt is generated when the specified fill level is re ached or if the specified fill level has been exceeded at the time data is read. fig. 13.4.8 receive fifo control register transmit fifo configuration register 7 6 5 4 3 2 1 0 bit symbol tfcs tfis til1 til0 read/write w r/w r r/w after reset 0 0 0 0 0 0 0 0 function clear tx fifo 1: clear always reads "0." select interrupt generation condition fifo fill level to generate tx interrupts 00: empty 01: 1byte 10: 2byte 11: 3byte note: til1 is ignored when fdpx1:0 = 11 (full duplex). 0: an interrupt is generated when the specified fill level is reached. 1: an interrupt is generated when the specified fill level is re ached or if the level is lower than the specified fill level at the time new data is written. fig. 13.4.9 transmit fifo configuration register sc0rfc (0xffff_f268) sc0tfc (0xffff_f269)
tmp19a64c1d tmp19a64(rev1.1)- 13-28 7 6 5 4 3 2 1 0 bit symbol ror rlvl2 rlvl1 rlvl0 read/write r r r after reset 0 0 0 0 0 0 0 0 function rx fifo overrun 1: generated status of rx fifo fill level 000: empty 001: 1byte 010: 2byte 011: 3byte 100: 4byte (note) the bit is cleared to "0" when receive data is read from the sc0buf register. fig. 13.4.10 receive fifo status register 7 6 5 4 3 2 0 bit symbol tur tlvl2 tlvl1 tlvl0 read/write r r r after reset 1 0 0 0 0 0 0 0 function tx fifo under run 1: generated status of tx fifo fill level 000: empty 001: 1byte 010: 2byte 011: 3byte 100: 4byte (note) the bit is cleared to "0" when tran smit data is written to the sc0buf register. fig. 13.4.11 transmit fifo status register 7 6 5 4 3 2 1 0 bit symbol sioe read/write r r/w after reset 0 0 0 0 0 0 0 0 function sio operation 0: disable 1: enable : it specifies sio operation. when sio ope ration is disabled, the clock will not be supplied to the sio module except for the register part and thus power dissipation can be reduced (other registers cannot be accessed for read/write operation). when sio is to be used, be sure to enable sio by setting "1" to this register before setting any other registers of the sio module. if sio is enabled once and then disabled, any register setting is maintained. fig. 13.4.12 sio enable register sc0en (0xffff_f267) sc0tst (0xffff_f26b) sc0rst (0xffff_f26a)
tmp19a64c1d tmp19a64(rev1.1)- 13-29 13.5 operation in each mode 13.5.1 mode 0 (i/o interface mode) mode 0 consists of two modes, i.e., the "sclk output" mode to output synchronous clock and the "sclk input" mode to accept synchronous cl ock from an external source. the following operational descriptions are for the case use of fifo is di sabled. for details of fifo operatio n, refer to the previous sections describing receive/transmit fifo functions. c sending data sclk output mode in the sclk output mode, if sc0mod2 is set to "0" and the send double buffers are disabled, 8 bits of data are output from the txd0 pin and the synchronous clock is output from the sclk0 pin each time the cpu writes data to the send buffer. when all data is output, the inttx0 interrupt is generated. if sc0mod2 is set to "1" and the send double buffers are enabled, data is moved from send buffer 2 to send buffer 1 when the cpu writes data to send buffer 2 while data transmission is halted or when data transmission from send buffer 1 (shift register) is completed. when data is moved from send buffer 2 to send buffer 1, the send buffer empty flag sc0mod2 is set to "1," and the inttx0 interrupt is generated. if send buffer 2 has no data to be moved to send buffer 1, the inttx0 interrupt is not generated and the sclk0 output stops. transmit data write timin g sclk0 output bit 0 bit 6 bit 7 bit 1 txd0 (inttx0 interrupt request) bit 0 = "0" (if double buffering is disabled) transmit data write timing sclk0 output bit 0 bit 6 bit 7 bit 1 txd0 (inttx0 interrupt request) bit 0 tbrun tbemp = "1" (if double buffering is enabled) (if there is data in buffer 2) tbrun
tmp19a64c1d tmp19a64(rev1.1)- 13-30 transmit data write timing sclk0 output bit 0 bit 6 bit 7 bit 1 txd0 (inttx0 interrupt request) t brun tbemp = "1" (if double buffering is enabled) (if there is no data in buffer 2) fig. 13.5.1.11 send operation in the i/o interface mode (sclk0 output mode) sclk input mode in the sclk input mode, if sc0mod2 is set to "0" and the send double buffers are disabled, 8-bit data that has been written in the send buffer is output from the txd0 pin when the sclk0 input becomes active. when all 8 bits are sent, the inttx0 interrupt is generated. the next send data must be written before the timing point "a" as shown in fig. 13.5.1.2. if sc0mod2 is set to "1" and the send double buffers are enabled, data is moved from send buffer 2 to send buffer 1 when the cpu writes data to send buffer 2 before the sclk0 becomes active or when data transmission from send buffer 1 (shift register) is completed. as data is moved from send buffer 2 to send buffer 1, the send buffer empty flag sc0mod2 is set to "1" and the inttx0 interrupt is generated. if the sclk0 input becomes active while no data is in send buffer 2, although the internal bit counter is started, an under-run error occurs and 8-bit dummy data (ffh) is sent. sclk0 input (=0 rising edge mode) sclk0 input (=1 f alling edge mode) bit 0 bit 1 txd0 (inttx0 interrupt request) bit 5 bit 6 bit 7 transmit data write timing bit 0 bit 1 a = "0" (if double buffering is disabled)
tmp19a64c1d tmp19a64(rev1.1)- 13-31 sclk0 input (=0 rising edge mode) sclk0 input (=1 f alling edge mode) bit 0 bit 1 txd0 (inttx0 interrupt request) bit 5 bit 6 bit 7 transmit data write timing bit 0 bit 1 a tbrun tbemp = "1" (if double buffering is enabled) (if there is data in buffer 2) sclk0 input (=0 rising edge mode) sclk0 input (=1 f alling edge mode) bit 0 bit 1 txd0 (inttx0 interrupt request) bit 5 bit 6 bit 7 transmit data write timing 1 1 a tbrun tbemp perr (functions to detect under-run errors) = "1" (if double buffering is enabled) (if there is no data in buffer 2) fig. 13.5.1.2 send operation in the i/o interface mode (sclk0 input mode)
tmp19a64c1d tmp19a64(rev1.1)- 13-32 d receiving data sclk output mode in the sclk output mode, if sc0mod2 = "0" and receive double buffering is disabled, a synchronous clock pulse is output from the sclk0 pin and the next data is shifted into receive buffer 1 each time the cpu reads received data. when all the 8 bits are received, the intrx0 interrupt is generated. the first sclk output can be started by setting the receive enable bit sc0mod0 to "1." if the receive double buffering is enabled with sc0mod2 set to "1," the first frame received is moved to receive buffer 2 and receive buffer 1 can receive the next frame successively. as data is moved from receive buffer 1 to receive buffer 2, the receive buffer full flag sc0mod2 is set to "1" and the intrx0 interrupt is generated. while data is in receive buffer 2, if cpu/dmac ca nnot read data from receive buffer 2 in time before completing reception of the next 8 bits, the intrx0 interrupt is not generated and the sclk0 clock stops. in this state, re ading data from receive buffer 2 allows data in receive buffer 1 to move to receive buffer 2 and thus the intrx0 interrupt is generated and data reception resumes. receive data write timing sclk0 output bit 0 bit 6 bit 7 bit 1 rxd0 (intrx0 interrupt request) bit 0 = "0" (if double buffering is disabled) receive data read timing sclk0 output bit 0 bit 6 bit 7 bit 1 rxd0 (intrx0 interrupt request) bit 0 bit 7 rbfull = "1" (if double buffering is enabled) (if data is read from buffer 2)
tmp19a64c1d tmp19a64(rev1.1)- 13-33 receive data read timing sclk0 output bit 0 bit 6 bit 7 bit 1 rxd0 (intrx0 interrupt request) rbfull bit 7 = "1" (if double buffering is enabled) (if data cannot be read from buffer 2) fig. 13.5.1.3 receive operat ion in the i/o interface mode (sclk0 output mode) sclk input mode in the sclk input mode, since receive double buffe ring is always enabled, the received frame can be moved to receive buffer 2 and receive buff er 1 can receive the next frame successively. the intrx receive interrupt is generated each tim e received data is moved to received buffer 2. sclk0 input (=0 rising edge mode) sclk0 input (=1 f alling edge mode) bit 0 bit 1 rxd0 (intrx0 interrupt request) bit 5 bit 6 bit 7 receive data read timing bit 0 rbfull if data is read from buffer 2 sclk0 input (=0 rising edge mode) sclk0 input (=1 f alling edge mode) bit 0 bit 1 rxd0 (intrx0 interrupt request) bit 5 bit 6 bit 7 receive data read timing bit 0 rbfull oerr if data cannot be read from buffer 2 fig. 13.5.1.4 receive oper ation in the i/o interface mode (sclk0 input mode) (note) to receive data, sc0mod must always be set to "1" (receive enable) regardless of the sclk input or output mode.
tmp19a64c1d tmp19a64(rev1.1)- 13-34 e send and receive (full-duplex) the full-duplex mode is enabled by setting bit 6 of the serial mode control register 1 (sc0mod1) to "1." sclk output mode in the sclk output mode, if sc 0mod2 is set to "0" and both the send and receive double buffers are disabled, sclk is output when the cpu writes data to the send buffer. subsequently, 8 bits of data are shifted into recei ve buffer 1 and the intrx0 receive interrupt is generated. concurrently, 8 bits of data written to the send buffer are output from the txd0 pin, the inttx0 send interrupt is generated when transmission of all data bits has been completed. then, the sclk output stops. in this, the next round of data transmission and reception starts when the data is read from the receive buffer and the next send data is written to th e send buffer by the cpu. the order of reading the receive buffer and writi ng to the send buffer can be freely determined. data transmission is resumed only when both conditions are satisfied. if sc0mod2 = "1" and double buffering is enabled for both transmission and reception, sclk is output when the cpu writes data to the send buffer. subsequently, 8 bits of data are shifted into receive buffer 1, moved to receive buf fer 2, and the intrx0 interrupt is generated. while 8 bits of data is received, 8 bits of transm it data is output from the txd0 pin. when all data bits are sent out, the inttx0 interrupt is ge nerated and the next data is moved from the send buffer 2 to send buffer 1. if send buffer 2 has no data to be moved to send buffer 1 (sc0mod2 = 1) or when receive buffer 2 is fu ll (sc0mod2 = 1), the sclk clock is stopped. when both conditions are satisfied, i.e., r eceive data is read and send data is written, the sclk output is resumed and the next round of data transmission is started. receive data read timing sclk0 output bit 0 bit 6 bit 7 bit 1 txd0 (inttx0 interrupt request) bit 0 transmit data w rite timing (intrx0 interrupt request) bit 5 bit 1 bit 0 bit 6 bit 7 bit 1 rxd0 bit 0 bit 5 bit 1 = "0" (if double buffering is disabled)
tmp19a64c1d tmp19a64(rev1.1)- 13-35 receive data read timing sclk0 outpu t bit 0 bit 6 bit 7 bit 1 txd0 (inttx0 interrupt request) bit 0 transmit data w rite timing (intrx0 interrupt request) bit 5 bit 1 bit 0 bit 6 bit 7 bit 1 rxd0 bit 0 bit 5 bit 1 = "1" (if double buffering is enabled) receive data read timing sclk0 output bit 0 bit 6 bit 7 bit 1 txd0 (inttx0 interrupt request) transmit data w rite timing (intrx0 interrupt request) bit 5 bit 0 bit 6 bit 7 bit 1 rxd0 bit 5 = "1" (if double buffering is enabled) fig. 13.5.1.5 send/receive oper ation in the i/o interface mode (sclk0 output mode)
tmp19a64c1d tmp19a64(rev1.1)- 13-36 sclk input mode in the sclk input mode with sc0mod2 set to "0" and the send double buffers are disabled (double buffering is alwa ys enabled for the receive side), 8-bit data written in the send buffer is output from the txd0 pin and 8 bits of data is shifted into the receive buffer when the sclk0 input becomes active. the inttx0 interrupt is generated upon completion of data transmission and the intrx0 interrupt is generated at the instant the received data is moved from receive buffer 1 to receive buffer 2. note that transmit data must be writte n into the send buffer before the sclk input for the next frame (data must be written before the point a in fig. 13.5.1.6). as double buffering is enabled for data reception, data must be read before completing reception of the next frame data. if sc0mod2 = "1" and double buffering is enabled for both transmission and reception, the interrupt intrx0 is generated at the timing send buffer 2 data is moved to send buffer 1 after completing data transmission from se nd buffer 1. at the same time, the 8 bits of data received is shifted to buffer 1, moved to receive buffer 2, and the intrx0 interrupt is generated. upon the sclk input for the next frame, transmission from send buffer 1 (in which data has been moved from send buffer 2) is started while receive data is shifted into receive buffer 1 simultaneously. if data in receive buffer 2 has not been read when the last bit of the frame is received, an overrun error occurs. similarly, if there is no data written to send buffer 2 when sclk for the next frame is input, an under-run error occurs. receive data read timing sclk0 inpu t bit 0 bit 6 bit 7 bit 1 txd0 (inttx0 interrupt request) bit 0 transmit data w rite timing (intrx0 interrupt request) bit 5 bit 1 bit 0 bit 6 bit 7 bit 1 rxd0 bit 0 bit 5 bit 1 = "0" (if double buffering is disabled) a
tmp19a64c1d tmp19a64(rev1.1)- 13-37 receive data read timing sclk0 inp bit 0 bit 6 bit 7 bit 1 txd0 (inttx0 interrupt request) bit 0 transmit data w rite timing intrx0 interrupt request) bit 5 bit 1 bit 0 bit 6 bit 7 bit 1 rxd0 bit 0 bit 5 bit 1 = "1" (if double buffering is enabled) (no errors) receive data read timing sclk0 inpu t bit 0 bit 6 bit 7 bit 1 txd0 (inttx0 interrupt request) bit 0 transmit data w rite timing (intrx0 interrupt request) bit 5 bit 1 bit 0 bit 6 bit 7 bit 1 rxd0 bit 0 bit 5 bit 1 perr (under-run error) = "1" (if double buffering is enabled) (error generation) fig. 13.5.1.6 send/receive operation in t he i/o interface mode (sclk0 input mode)
tmp19a64c1d tmp19a64(rev1.1)- 13-38 13.5.2 mode 1 (7-bit uart mode) the 7-bit uart mode can be selected by setting the serial mode control register (sc0mod ) to "01." in this mode, parity bits can be added to the transm it data stream; the serial mode control register (sc0cr ) controls the parity enable/disable setting. when

is set to "1" (enable), either even or odd parity may be selected using the sc0cr bit. the length of the stop bit can be specified using sc0mod2. example: the control register settings for transmitting in the following data format are listed in the following table. transmission direction (transmission rate of 2400bps, @fc =24.576mhz) start bit 0 1 2 3 5 4 6 even parity stop * clocking conditions system clock : high-speed (fc) high-speed clock gear : x 1 (fc) prescaler clock : fperiph/4 (fperiph = fsys) 7 6 5 4 3 2 1 0 pccr ? ? ? ? ? ? ? 1 pcfc ? ? ? ? ? ? ? 1 designates pc0 as the txd0 pin. sc0mod x 0 ? x 0 101 sets the 7-bit uart mode. sc0cr x 1 1 x x x 0 0 adds even parity. br0cr 0 0 1 0 1 0 1 0 sets the data rate to 2400 bps. imc3 ? 1 1 ? 0 100 enables the inttx0 interrupt and sets to level 4 by the <31:24> bits of the 32 bit register. sc0buf * * * * * * * * sets the data to be sent. note: x: don't care - : no change 13.5.3 mode 2 (8-bit uart mode) the 8-bit uart mode can be selected by setting sc0mod0 to "10." in this mode, parity bits can be added and parity enable/disable is controlled using sc0cr . if = "1" (enabled), either even or odd parity can be selected using sc0cr . example: the control register settings for receivi ng data in the following format are as follows: transmission direction (transmission rate of 9600bps, @fc =24.576mhz) start bit 0 1 2 3 5 4 6 odd parity stop 7 * clocking conditions system clock : high-speed (fc) high-speed clock gear : x 1 (fc) prescaler clock : fperiph/4 (fperiph = fsy s )
tmp19a64c1d tmp19a64(rev1.1)- 13-39 main routine settings 7 6 5 4 3 2 1 0 pccr ? ? ? ? ? ? 0 ? pcfc ? ? ? ? ? ? 1 ? designates pc1 as the rxd0 pin. sc0mod ? 0 0 x 1 0 0 1 selects the 8-bit uart mode. sc0cr x 0 1 x x x 0 0 sets odd parity. br0cr 0 0 0 1 0 1 0 1 sets the data rate to 9600 bps. imc3 ? 1 1 ? 0100 enables the intrx0 interrupt and sets to level 4 by the <23:16> bits of the 32 bit register. sc0mod ? ? 1 x ? ? ? ? enables reception of data. an example interrupt routine process intclr 0 0 0 1 1 1 0 0 0 clears the interrupt request. 0x0000_0038 reg. sc0cr and 0x1c if reg. is not "0" then error processing set sc0buf to reg. reads received data. interrupt processing is completed note: x: don't care - : no change performs error check no yes error processing sc0cr=0x1c ? sc0buf data read interrupt process complete interrupt process start intclr=0x38
tmp19a64c1d tmp19a64(rev1.1)- 13-40 13.5.4 mode 3 (9-bit uart) the 9-bit uart mode can be selected by setting sc0mod0 to "11." in this mode, parity bits must be disabled (sc0cr = "0"). the most significant bit (9th bit) is written to b it 7 of the serial mode control register 0 (sc0mod0) for transmit data and it is stored in bit 7 of the serial control register sc0cr upon receiving data. when writing or readin g data to/from the buffers, the most significant bit must be written or read first before writing or reading to/from sc0buf. the stop bit length can be specified using sc0mod2 . wakeup function in the 9-bit uart mode, slave controllers can be operated in the wake-up mode by setting the wake-up function control bit sc0mod0 to "1." in this case, the interrupt intrx0 will be generated only when sc0cr is set to "1." (note) the txd pin of the slave controller must be set to the open drain output mode using the ode register. fig. 13.5.4.1 serial links to use wake-up function txd master slave 1 slave 2 slave 3 rxd txd rxd txd txd rxd rxd
tmp19a64c1d tmp19a64(rev1.1)- 13-41 protocol c select the 9-bit uart mode for the master and slave controllers. d set sc0mod to "1" for the slave contro llers to make them ready to receive data. e the master controller is to send a single frame of data that includes the slave controller select code (8 bits). in this, the most significant bit (bit 8) must be set to "1." slave controller select code start bit 0 1 2 3 5 4 6 stop 7 8 ?1? f every slave controller receives the above data frame; if the code received matches with the controller's own select code, it clears the wu bit to "0." g the master controller transmits data to the desi gnated slave controller (the controller of which sc0mod bit is cleared to "0"). in this, the most significant bit (bit 8) must be set to "0." data ?0? start bit 0 1 2 3 5 4 6 stop 7 bit 8 h the slave controllers with the bit set to "1" ignore the receive data because the most significant bit (bit 8) is set to "0" a nd thus no interrupt (intrx0) is generated. also, the slave controller with the bit set to "0" can transmit data to the master controller to inform that the data has been successfully received. example setting: using the internal clock fsys/2 as the transfer clock, two slave controllers are serially linked as follows: txd master slave 1 slave 2 select code 00000001 rxd txd rxd txd rxd select code 00001010
tmp19a64c1d tmp19a64(rev1.1)- 13-42 c master controller setting main routine pccr ? ? ? ? ? ? 01 pcfc ? ? ? ? ? ? 11 designates pc0/pc1 as the txd0/rxd0 pins, respectively. ? 1 1 ? 0101 enables the intrx0 interrupt and sets to level 5 by the <23:16> bits of the 32 bit register. imc3 ? 1 1 ? 0100 enables the inttx0 interrupt and sets to level 4 by the <31:24> bits of the 32 bit register. sc0mod0 1 0 1 0 1 1 1 0 sets the 9-bit uart mode and fsys/2 transfer clock. sc0buf 0 0 0 0 0 0 0 1 sets the select code of slave 1. interrupt routine (inttx0) intclr 0 0 0 1 1 1 1 0 0 clears the interrupt request. (0x0000_003c) sc0mod0 0 ? ? ? ? ? ? ? sets tb8 to "0." sc0buf * * * * * * * * sets the data to be sent. interrupt processing is completed. d slave controller setting main routine pccr ? ? ? ? ? ? 01 pcfc ? ? ? ? ? ? 11 designates pc0 as txd (open drain output) and pc1 as rxd. pcode ? ? ? ? ? ? ? 1 ? 1 1 ? 0110 enables inttx0 and intrx0. imc3 ? 1 1 ? 0101 sc0mod0 0 0 1 1 1 1 1 0 sets the 9-bit uart mode and f sys /2 transfer clock and sets to "1." interrupt routine (intrx0) intclr 0 0 0 1 1 1 0 0 0 clears the interrupt request. reg. sc0buf if reg. = select code, then sc0mod0 ? ? ? 0 ? ? ? ? clears to "0."
tmp19a64c1d tmp19a64(rev1.1)- 14-1 14. serial bus interface (sbi) the tmp19a64 contains a serial bus interface (sbi) channel, which has the following two operating modes: ? i 2 c bus mode (with multi-master capability) ? clock-synchronous 8-bit sio mode in the i 2 c bus mode, the sbi is connected to external devi ces via pf0 (sda) and pf1 (scl). in the clock- synchronous 8-bit sio mode, the sbi is connected to external devices via pf2 (sck), pf0 (so) and pf1 (si). the following table shows the programming required to put the sbi in each operating mode. pfode pfcr pffc i2c bus mode 11 x11 011 clock-synchronous 8-bit sio mode xx 101 (clock output) 001 (clock input) 111 x: don't care 14.1 configuration the configuration is shown in fig. 14.1. fig. 14.1 sbi block diagram i 2 c bus clock synchroni- zation + control shift register sbicr2/ sbisr sbidbr intsbi interrupt request fsys/4 sbi control register 2/ sbi status register i 2 c bus address register sbi data buffer register sbi control registers 0 and 1 sbi baud rate registers 0 and 1 sda so si scl sck pf2 pf0 pf1 (sck) (so/sda) (si/scl) sio clock control frequency divider transfer control circuit sbicr0,1 sbibr0, 1 i2car noise canceller i 2 c bus data control sio data control input/ output control noise canceller
tmp19a64c1d tmp19a64(rev1.1)- 14-2 14.2 control the following registers control the serial bus interface and provide its status information for monitoring. ? serial bus interface control register 0 (sbicr0) ? serial bus interface control register 1 (sbicr1) ? serial bus interface control register 2 (sbicr2) ? serial bus interface buffer register (sbidbr) ? i 2 c bus address register (i2car) ? serial bus interface status register (sbisr) ? serial bus interface baud rate register 0 (sbibr0) the functions of these registers vary, depending on the mode in which the sbi is operating. for a detailed description of the registers, re fer to "14.5 control in the i 2 c bus mode" and "14.7 control in the clock- synchronous 8-bit sio mode." 14.3 i 2 c bus mode data formats fig. 14.3 shows the data formats used in the i 2 c bus mode. fig. 14.3 i 2 c bus mode data formats note: s: start condition w / r : direction bit ack: acknowledge bit p: stop condition r / w r / w s (a) addressing format (b) addressing format (with repeated start condition) (c) free data format (master-transmitter to slave-receiver) slave address data p s s sp p 8 bits 1to 8bits 1 once repeated 1to 8bits a c k slave address data data once once a c k a c k 8 bits 1to 8bits 8bits 1to 8bits 11 1 1 1 1 8bits 1 to 8 bits 1to 8bits data data data data a c k 1 1 1 slave address repeated once repeated repeated r / w a c k a c k a c k a c k a c k a c k
tmp19a64c1d tmp19a64(rev1.1)- 14-3 14.4 control registers in the i 2 c bus mode the following registers control the se rial bus interface (sbi) in the i 2 c bus mode and provide its status information for monitoring. serial bus interface control register 0 7 6 5 4 3 2 1 0 bit symbol sbien read/write r/w r after reset 0 0 0 0 0 0 0 0 function sbi operation 0: disable 1: enable : to use the sbi, enable the sbi operat ion ("1") before setting each register in the sbi module. (note) bits 0 to 6 of sbicro are read as "0." fig. 14.4.1 i 2 c bus mode register sbicr0 (0xffff_f257)
tmp19a64c1d tmp19a64(rev1.1)- 14-4 serial bus interface control register 1 7 6 5 4 3 2 1 0 bit symbol bc2 bc1 bc0 ack sck2 sck1 sck0/ swrmon read/write r/w r/w r r/w r/w after reset 0 0 0 0 1 0 0 1 function select the number of bits per transfer (note 1) acknow- ledgment clock 0: not generate 1: generate select internal scl output clock frequency (note 2) and reset monitor on writing : select internal scl output clock frequency 000 001 010 011 100 101 110 111 n=5 n=6 n=7 n=8 n=9 n=10 n=11 265 khz 201 khz 136 khz 83 khz 46 khz 25 khz 13 khz reserved system clock : fsys (=54 mhz) clock gear : fc/1 frequency = [hz] on reading : softwa re reset status monitor 0 software reset operation is in progress. 1 software reset operation is not in progress. select the number of bits per transfer when = 0 when = 1 number of clock cycles data length number of clock cycles data length 000 001 010 011 100 101 110 111 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 9 2 3 4 5 6 7 8 8 1 2 3 4 5 6 7 (note 1) clear to "000" before switchi ng the operation mode to the clock-synchronous 8-bit sio mode. (note 2) for details on the scl line clock frequency, refer to "14.5.3 serial clock." (note 3) after a reset, the bit is read as "1." however, if the sio mode is selected at the sbicr2 register, the initial value of the bit is "0." fig. 14.4.2 i 2 c bus mode register sbicr1 (0xffff_f250) fsys/2 2 n + 70
tmp19a64c1d tmp19a64(rev1.1)- 14-5 serial bus interface control register 2 7 6 5 4 3 2 1 0 bit symbol mst trx bb pin sbim1 sbim0 swrst1 swrst0 read/write w w w after reset 0 0 0 1 0 0 0 0 function select master/slave 0: slave 1: master select transmit/ receive 0: receive 1: transmit start/stop condition generation 0: stop condition generated 1: start condition generated clear intsbi interrupt request 0: ? 1: clear interrupt request select serial bus interface operating mode (note 2) 00: port mode 01: sio mode 10: i 2 c bus mode 11: (reserved) software reset generation write "10" followed by "01" to generate a reset. select serial bus interf ace operating mode (note 2) 00 port mode (serial bus in terface output disabled) 01 clock-synchronous 8-bit sio mode 10 i 2 c bus mode 11 (reserved) (note 1) reading this register causes it to function as the sbisr register. (note 2) ensure that the bus is free before switching the operating mode to the port mode. ensure that the port is at the "h" level before switching the operating mode from the port mode to the i 2 c bus or clock-synchronous 8-bit sio mode. fig. 14.4.3 i 2 c bus mode register table 14.4.4 base clock resolution @fsys = 54 mhz clock gear value base clock resolution 000 (fc) fsys/2 2 (0.07 s) 100 (fc/2) fsys/2 3 (0.14 s) 110 (fc/4) fsys/2 4 (0.28 s) 111 (fc/8) fsys/2 5 (0.58 s) sbicr2 (0xffff_f253)
tmp19a64c1d tmp19a64(rev1.1)- 14-6 serial bus interface status register 7 6 5 4 3 2 1 0 bit symbol mst trx bb pin al aas ad0 lrb read/write r after reset 0 0 0 1 0 0 0 0 function master/slave selection monitor 0: slave 1: master transmit/ receive selection monitor 0: receive 1: transmit i 2 c bus state monitor 0: free 1: busy intsbi interrupt request monitor 0: interrupt request generated 1: interrupt request cleared arbitration lost detection 0: ? 1: detected slave address match detection 0: ? 1: detected general call detection 0: ? 1: detected last received bit monitor 0: "0" 1: "1" last received bit monitor 0 the last bit received was "0." 1 the last bit received was "1." addressed as slave 0 ? 1 addressed as slave or general call detected arbitration lost 0 ? 1 arbitration was lost to another master (note) writing to this register causes it to function as sbicr2. fig. 14.4.5 i 2 c bus mode register sbisr (0xffff_f253)
tmp19a64c1d tmp19a64(rev1.1)- 14-7 serial bus interface baud rate register0 7 6 5 4 3 2 1 0 bit symbol i2sbi read/write r r/w r r/w after reset 1 0 1 1 1 1 1 0 function idle 0: stop 1: operate make sure that you write "0." operation in the idle mode 0stop 1operate serial bus interface data buffer register 7 6 5 4 3 2 1 0 bit symbol db7 db6 db5 db4 db3 db2 db1 db0 read/write r (receive)/w (transmit) after reset 0 (note) transmit data must be written to this register, with bit 7 being the most-significant bit (msb). i 2 c bus address register 7 6 5 4 3 2 1 0 bit symbol sa6 sa5 sa4 sa3 sa2 sa1 sa0 als read/write r/w after reset 0 0 0 0 0 0 0 0 function set the slave address when the sbi acts as a slave device. specify address recognition mode specify address recognition mode 0 recognizes the slave address. 1 does not recognize slave address. fig. 14.4.6 i 2 c bus mode register sbibr0 (0xffff_f254) sbidbr (0xffff_f251) i2car (0xffff_f252)
tmp19a64c1d tmp19a64(rev1.1)- 14-8 14.5 control in the i 2 c bus mode 14.5.1 setting the acknowledgement mode setting sbicr1 to "1" selects the acknowledge mode. when operating as a master, the sbi adds one clock for acknowledgment signals. as a transmitte r, the sbi releases the sda pin during this clock cycle to receive acknowledgment signals from the receiver. as a receiver, the sbi pulls the sda pin to the "l" level during this clock cycle and generates acknowledgment signals. setting to "0" selects the non-acknowledgment mode. when operating as a master, the sbi does not generate clock for acknowledgement signals. 14.5.2 setting the number of bits per transfer sbicr1 specifies the numb er of bits of the next data to be transmitted or received. under the start condition, is set to "000," causing a slave address and the direction bit to be transferred in a packet of eight bits. at other times, keeps a previously programmed value. 14.5.3 serial clock c clock source sb sbicr1 specifies the maximum frequency of the serial clock to be output from the scl pin in the master mode. fig. 14.5.3.1 clock source the highest speeds in the standard and high-speed modes are specified to 100 khz and 400 khz respectively in the communications standards. note that the internal scl clock frequency is determined by the fsys used and the calculation formula shown above. t high t low 1/fscl t low = 2 n-1 /(fsys/2) + 58/(fsys/2) t high = 2 n-1 /(fsys/2) + 12/(fsys/2) fscl = 1/(t low + t high ) sbi0cr1 n 000 001 010 011 100 101 110 5 6 7 8 9 10 11 = fsys/2 2 n + 70
tmp19a64c1d tmp19a64(rev1.1)- 14-9 d clock synchronization the i 2 c bus is driven by using the wired-and connection du e to its pin structure. the first master that pulls its clock line to the "l" level overrides other masters producing the "h" level on their clock lines. this must be detected and responded by the masters producing the "h" level. clock synchronization assures correct data transfer on a bus that has two or more masters. for example, the clock synchron ization procedure for a bus with two masters is shown below. fig. 14.5.3.2 example of clock synchronization at point a, master a pulls its internal scl output to the "l" level, bringing the scl bus line to the "l" level. master b detects this transition, resets its "h" level period counter, and pulls its internal scl output level to the "l" level. master a completes counting of its "l" level period at point b, and brings its internal scl output to the "h" level. however, master b still keeps the scl bus line at the "l" level, and master a stops counting of its "h" level period counting. after master a det ects that master b brings its internal scl output to the "h" level and brings the scl bus line to the "h" le vel at point c, it starts counting of its "h" level period. this way, the clock on the bus is determined by th e master with the shortest "h" level period and the master with the longest "l" level peri od among those connected to the bus. 14.5.4 slave addressing and address recognition mode when the sbi is configured to op erate as a slave device, the slave address and must be set at i2car. setting to "0" selects the address recognition mode 14.5.5 configuring the sbi as a master or a slave setting sbicr2 to "1" configures the sbi to operate as a master device. setting to "0" configures the sbi as a slave de vice. is cleared to "0" by the hardware when the stop condition has been detected on the bus or when arbitration has been lost. internal scl output (master a) internal scl output (master b) scl line reset high-level period counting wait for high-level period counting start high-level period counting a b c
tmp19a64c1d tmp19a64(rev1.1)- 14-10 14.5.6 configuring the sbi as a transmitter or a receiver setting sbicr2 to "1" configures the sbi as a transmitter. setting to "0" configures the sbi as a receiver. in the slave mode, the sbi receives the direction bit ( w r/ ) from the master device on the following occasions: ? when data is transmitted in the addressing format ? when the received slave address ma tches the value specified at i2ccr ? when a general-call address is received; i.e., th e eight bits following the start condition are all zeros if the value of the direction bit ( w r/ ) is "1," is set to "1" by the hardware. if the bit is "0," is set to "0." as a master device, the sbi receives acknowledgement from a slave device. if the directio n bit of "1" is transmitted, is set to "0" by th e hardware. if the direction bit is "0," changes to "1." if the sbi does not receive acknowledgement, retains the previous value is cleared to "0" by the hard ware when the stop co ndition has been detected on the bus or when arbitration has been lost. 14.5.7 generating start and stop conditions when sbisr is "0," writing "1" to sbicr2 causes th e sbi to generate the start condition on the bus and out put 8-bit data. must be set to "1" in advance. fig. 14.5.7.1 generating the start condition and a slave address when is "1," writing "1" to and "0" to causes th e sbi to start a sequence for generating the stop condition on the bus. the contents of should not be altered until the stop co ndition appears on the bus. fig. 14.5.7.2 generating the stop condition sbisr can be read to check the bus state. is set to "1" when the star t condition is detected on the bus (the bus is busy), and set to "0" when the stop condition is detected (the bus is free). scl line start condition a6 slave address and direction bit a cknowledgment signal 1 sda line 234567 8 9 a5 a4 a3 a2 a1 a0 r/w stop condition scl line sda line
tmp19a64c1d tmp19a64(rev1.1)- 14-11 14.5.8 interrupt service request and release when a serial bus interface interrupt request (intsbi) is generated, sbicr2 is cleared to "0." while is "0," the sbi pulls the scl line to the "l" level. after transmission or reception of on e data word, is cleared to "0." it is set to "1" when data is written to or read from sbidbr. it takes a period of t low for the scl line to be released after is set to "1." in the address recognition mode ( = "0"), is cleared to "0" when the received slave address matches the value specified at i2car or when a gene ral-call address is receive d; i.e., the eight bits following the start condition are all zer os. when the program writes "1" to sbicr2, it is set to "1." however, writing "0" does clear this bit to "0." 14.5.9 serial bus interface operating modes sbicr2 selects an operating mode of the serial bus interf ace. must be set to "10" to configure the sbi for the i 2 c bus mode. make sure that the bus is free before switching the operating mode to the port mode. 14.5.10 lost-arbitration detection monitor the i 2 c bus has the multi-master capability (there are two or more masters on a bus), and requires the bus arbitration procedure to ensu re correct data transfer. a master that attempts to generate the start condition while the bus is busy lose s bus arbitration, with no start condition occurring on th e sda and scl lines. the i 2 c-bus arbitration takes place on the sda line. the arbitration procedur e for two masters on a bus is shown below. up until point a, master a and master b output the same data. at point a, master a output s the "l" level and master b outputs the "h" level. then master a pulls the sda bus line to the "l" le vel because the line has the wired-and connection. when the scl line goes high at point b, the slave device reads the sda lin e data, i.e., data transmitted by master a. at this time, data transmitted by master b becomes invalid. in other words, master b loses arbitration. master b releases its sda pin, so that it does not affect the data transfer initiated by another master. if two or more masters have transmitted exactly the same first data word , the arbitra tion procedure continues with the second data word. fig. 14.5.10.1 lost arbitration loses arbitration and sets the internal sda output to "1." scl line internal sda output (master a) internal sda output (master b) sda line ab
tmp19a64c1d tmp19a64(rev1.1)- 14-12 a master compares the sda bus line le vel and the internal sda output level at the rising of the scl line. if there is a difference between these two values, the mast er loses arbitration and se ts sbi0sr to "1." when is set to "1," sbisr are clea red to "0," causing the sb i to operate as a slave receiver. is cleared to "0" when data is written to or read from sbidbr or data is written to sbicr2. fig. 14.5.10.2 example of mast er b losing arbitration (d7a = d7b, d6a = d6b) 14.5.11 slave address match detection monitor when the sbi operates as a slave device in the address recognition mode (i2ccr = "0"), sbisr is set to "1" on re ceiving the general-call a ddress or the slave address that matches the value specified at i2ccr. when is "1 ," is set to "1" when the fi rst data word has been received. is cleared to "0" when data is written to or read from sbidbr. 14.5.12 general-call detection monitor when the sbi operates as a slave device, sbisr is set to "1" when it receives the general-call address; i.e., the eight b its following the start cond ition are all zeros. is cleared to "0" when the start or stop condition is detected on the bus. 14.5.13 last received bit monitor sbisr is set to the sda line value that wa s read at the rising of the scl line. in the acknowledgment mode, reading sbisr immediat ely after generation of the intsbi interrupt request causes ack signal to be read. clock output stops here 1 internal sda output is held high because master b has lost arbitraiton. a ccess to sbidbr or sbicr2 internal scl output internal sda output internal sda output internal scl output master a master b 23456789 1 2 34 d7a d6b d5a d4a d3a d2a d1a d0a d7a? d6a? d5a? d4a? 1 234 d7b d6a
tmp19a64c1d tmp19a64(rev1.1)- 14-13 14.5.14 software reset if the serial bus interface circuit locks up due to ex ternal noise, it can be initia lized by using a software reset. writing "10" followed by "01" to sb icr2 generates a reset signal that initializes the serial bus interface circuit. after a reset, all control registers and status fl ags are initialized to their reset values. when the serial bus interface is initialized, is automatically cleared to "0." (note) after a software reset, the operating mode is also reset from the i 2 c mode to the synchronous communication mode. 14.5.15 serial bus interface data buffer register (sbidbr) reading or writing sbidbr initiates reading received data or writing transmitted data. when the sbi is acting as a master, setting a slave address and a directio n bit to this register ge nerates the start condition. 14.5.16 i 2 c bus address register (i2car) when the sbi is configured as a slave device, the i2car bit is used to specify a slave address. if i2c0ar is set to "0," the sbi recognizes a slave address transmitted by the master device and receives data in the addressing format. if is set to "1," the sbi does not recognize a slave address and receives data in the free data format. 14.5.17 idle setting register (sbibr0) the sbibr0 register determines if the sbi operates or not when it enters the idle mode. this register must be programmed before executing an instruction to switc h to the standby mode.
tmp19a64c1d tmp19a64(rev1.1)- 14-14 14.6 data transfer procedure in the i 2 c bus mode 14.6.1 device initialization first, program sbicr1 by writing "0" to bits 7 to 5 and bit 3 in sbicr1. next, program i2car by specifying a slave address at and an address recogn ition mode at . ( must be set to "0" when using the addressing format.) next, program sbicr2 to initially configure the sbi in the slave receiver mode by writing "0" to , "1" to , "10" to and "0" to bits 1 and 0. 7 6 5 4 3 2 1 0 sbicr1 0 0 0 x 0 x x x specifies ack and scl clock. i2car x x x x x x x x specifies a slave address and an address recognition mode. sbicr2 0 0 0 1 1 0 0 0 configures the sbi as a slave receiver. ( note) x: don?t care 14.6.2 generating the start condition and a slave address c master mode in the master mode, the following st eps are required to generate the start condition and a slave address. first, ensure that the bus is free ( = "0"). then, write "1" to sbicr1 to select the acknowledgment mode. write to sbidbr a slave ad dress and a direction b it to be transmitted. when = "0," writing "1111" to sbic r2 gene rates the start condition on the bus. following the start condition, the sbi generates nine clocks from the scl pin. the sbi outputs the slave address and the di rection bit specified at sbidbr with the first eight clocks, and releases the sda line in the ninth clock to receive an acknowledgment signal from the slave device. the intsbi interrupt request is gene rated on the falling of the ninth clock, and is cleared to "0." in the master mode, the sbi holds the scl line at th e "l" level while is "0." changes its value according to the transmitted di rection bit at generation of the in tsbi interrupt re quest, provided that an acknowledgment signal has been returned from the slave device. settings in main routine 7 6 5 4 3 2 1 0 reg. sbisr reg. reg. e 0x20 if reg. 0x00 ensures that the bus is free. then sbicr1 x x x 1 0 x x x selects the acknow ledgement mode. sbidr1 x x x x x x x x specifies the desired slav e address and direction. sbicr2 1 1 1 1 1 0 0 0 generates the start condition. example of intsbi interrupt routine intclr 0x50 clears the interrupt request. processing end of interrupt
tmp19a64c1d tmp19a64(rev1.1)- 14-15 slave mode in the slave mode, the sbi receives th e start conditio n and a slave address. after receiving the start condition from the master device, the sbi receives a slave address and a direction bit from the master device during the fi rst eight clocks on the scl line. if the received address matches its slave address sp ecified at i2car or is equal to the general-call address, the sbi pulls the sda line to the "l" level during the ninth clock and outputs an acknowledgment signal. the intsbi interrupt request is gene rated on the falling of the ninth clock, and is cleared to "0." in the slave mode, the sbi holds the scl lin e at the "l" level while is "0." (note) the user can only use a dma transfer: ? when there is only one master and only one slave and ? continuous transmission or reception is possible. fig. 14.6.2.1 generation of the st art condition and a slave address 14.6.3 transferring a data word at the end of a data word transfer , the intsbi interrupt is generated to test to determine whether the sbi is in the master or slave mode. c master mode ( = "1") test to determine whether the sbi is configured as a transmitter or a receiver. transmitter mode ( = "1") test . if is "1," that means the recei ver requires no further data. the master then generates the stop conditio n as described later to stop transmission. if is "0," that means the receiver requires furt her data. if the next data to be transmitted has eight bits, the data is written into sbidbr. if th e data has different leng th, and are programmed and the transmit data is written into sbidbr. writing the data makes to"1," causing the scl pin to generate a serial clock for transfer of a next data word, and the sda pin to transfer the data word. af ter the transfer is complete d, the intsbi interrupt re quest is generated, is set to "0," and the scl pin is pulled to the "l" level. to transmit more data words, test again and repeat the above procedure. scl start condition a6 slave address + direction bit a cknowledgement from slave 1 sda 2 345678 9 a5 a4 a3 a2 a1 a0 w r/ intsbi interrupt request ack master to slave slave to master
tmp19a64c1d tmp19a64(rev1.1)- 14-16 intsbi interrupt if mst = 0 then go to the slave-mode processing if trx = 0 then go to the receiver-mode processing if lrb = 0 then go to processing for generating the stop condition sbicr1 x x x x 0 x x x specifies the number of bits to be transmitted and specify whether ack is required. sbidbr x x x x x x x x writes the transmit data. end of interrupt processing (note) x: don?t care fig. 14.6.3.1 = "000" and = "1" (transmitter mode) receiver mode ( = "0") if the next data to be transmitted has eight bits, the transmit data is written into sbidbr. if the data has different length, and are programmed and the received data is read from sbidbr to release the scl line. (the data read immediately af ter transmission of a slave address is undefined.) on reading the data, is set to "1," and the serial clock is outp ut to the scl pin to transfer the next data word. in the last bit, when the acknowle dgment signal becomes the "l" level, "0" is output to the sda pin. after that, the intsbi interrupt re quest is generated, and is cleared to "0," pulling the scl pin to the "l" level. each time the received data is read from sbidbr, one-word transfer clock and an acknowledgement signal are output. fig. 14.6.3.2 = "000" and = "1" (receiver mode) scl pin write to sbi0dbr d7 a cknowledgment signal from receiver 1 sda pin 2 345678 9 d6 d5 d4 d3 d2 d1 intsbi interrupt request ack master to slave slave to master d0 scl d7 a cknowledgment signal to transmitter 1 sda 2 345678 9 d6 d5 d4 d3 d2 d1 intsbi interrupt request ack master to slave slave to master d0 read the received data next d7
tmp19a64c1d tmp19a64(rev1.1)- 14-17 to terminate the data transmission from the transmitter, must be set to "0" immediately before reading the second to last data word. this disables generation of an acknowledgment clock for the last data word. when th e transfer is completed, an interrupt request is genera ted. after the interrupt processing, must be set to "001" and the data must be read so that a clock is generated for 1- bit transfer. at this time, the ma ster receiver holds the sd a bus line at the "h" level, which signals the end of transfer to the transmitter as an acknowledgment signal. in the interrupt proce ssing for terminating the rece ption of 1-bit data, the stop condition is generated to terminate the data transfer. fig. 14.6.3.3 terminating data transm ission in the master receiver mode example: when receiving n data words intsbi interrupt (after data transmission) 7 6 5 4 3 2 1 0 sbicr1 x x x x 0 x x x sets the number of bits of da ta to be received and specify whether ack is required. reg. sbi0cbr reads dummy data. end of interrupt intsbi interrupt (first to (n-2)th data reception) 7 6 5 4 3 2 1 0 reg. sbidbr reads the first to (n-2)th data words. end of interrupt intsbi interrupt ( (n-1 )th data reception) 7 6 5 4 3 2 1 0 sbi0cr1 x x x 0 0 x x x disables generation of acknowledgement clock. reg. sbidbr reads the (n-1)th data word. end of interrupt intsbi interrupt (n th data reception) 7 6 5 4 3 2 1 0 sbi0cr1 0 0 1 0 0 x x x generates a clock for 1-bit transfer. reg. sbidbr reads the nth data word. end of interrupt intsbi interrupt (after co mpleting data reception) processing to generate the stop condition terminates the data transmission. end of interrupt (note) x: don?t care scl d7 a cknowledgment signal h to transmitter 1 sda 2 345678 1 d6 d5 d4 d3 d2 d1 intsbi interrupt request master to slave slave to master d0 read out the received data after clearing to "0." 9 read out the received data after setting to "001."
tmp19a64c1d tmp19a64(rev1.1)- 14-18 d slave mode ( = "0") in the slave mode, the sbi generates the intsbi in terrupt request on four o ccasions: 1) when the sbi has received any slave address from the master, 2) wh en the sbi has received a general-call address, 3) when the received slave address matches its own ad dress, and 4) when a data transfer has been completed in response to a general-ca ll. also, if the sbi loses arbitra tion in the master mode, it switches to the slave mode. upon the completion of data word transfer in whic h arbitration is lost, the intsbi interrupt request is ge nerated, is cleared to "0," and the scl pin is pulled to the "l" level. when data is written to or read from sb idbr or when is set to "1," the scl pin is released after a period of t low . in the slave mode, the normal slave mode processing or the processing as a result of lost arbitration is carried out. sbisr , , and are tested to determine the processing required. table 14.6.3.4 shows the slave mode st ates and required processing. example: when the received slave address matches the sbi's own address and the direction bit is "1" in the slave receiver mode intsbi interrupt if trx = 0 then go to other processing if al = 1 then go to other processing if aas = 0 then go to other processing sbicr1 x x x 1 0 x x x sets the number of bits to be transmitted. sbidbr x x x x 0 x x x sets the transmit data. (note) x: don?t care
tmp19a64c1d tmp19a64(rev1.1)- 14-19 table 14.6.3.4 processing in slave mode state processing 1 1 0 arbitration was lost while the slave address was being transmitted, and the sbi received a slave address with the direction bit "1" transmitted by another master. 1 0 in the slave receiver mode, the sbi received a slave address with the direction bit "1" transmitted by the master. set the number of bits in a data word to and write the transmit data into sbi0dbr. 1 0 0 0 in the slave transmitter mode, the sbi has completed a transmission of one data word. test lrb. if it has been set to "1," that means the receiver does not require further data. set to 1 and reset to 0 to release the bus. if has been reset to "0," that means the receiver requires further data. set the number of bits in the data word to and write the transmit data to the sbidbr. 1 1/0 arbitration was lost while a slave address was being transmitted, and the sbi received either a slave address with the direction bit "0" or a general- call address transmitted by another master. 1 0 0 arbitration was lost while a slave address or a data word was being transmitted, and the transfer terminated. 1 1/0 in the slave receiver mode, the sbi received either a slave address with the direction bit "0" or a general-call address transmitted by the master. read the sbidbr (a dummy read) to set to 1, or write "1" to . 0 0 0 1/0 in the slave receiver mode, the sbi has completed a reception of a data word. set the number of bits in the data word to and read the received data from sbidbr.
tmp19a64c1d tmp19a64(rev1.1)- 14-20 14.6.4 generating the stop condition when sbisr is "1," writing "1 " to sbicr2 an d "0" to causes the sbi to start a sequence for generating the stop condition on the bus. do not alter the contents of until the stop cond ition appears on the bus. if another device is holding down the scl bus line, the sbi waits until the scl line is released. after that, the sda pin goes high, causing the stop condition to be generated. 7 6 5 4 3 2 1 0 sbicr2 1 1 0 1 1 0 0 0 generates the stop condition. fig. 14.6.4.1 generating the stop condition scl pin sda pin (read) stop condition ?1? ?1? ?0? ?1?
tmp19a64c1d tmp19a64(rev1.1)- 14-21 14.6.5 repeated start procedure repeated start is used when a master device changes the data transfer directio n without terminating the transfer to a slave device. the procedure of generatin g a repeated start in the master mode is described below. first, set sbicr2 to "0" and write "1" to to rel ease the bus. at this time, the sda pin is held at the "h" level and the scl pin is re leased. because no stop condition is generated on the bus, other devices think that the bus is busy. then , test sbisr and wait until it becomes "0" to ensure that the scl pin is released . next, test and wait until it be comes "1" to ensure that no other device is pulling the scl bus line to th e "l" level. once the bus is determ ined to be free this way, use the steps described above in (2) to generate the start condition. to satisfy the setup time of repeated start, at least 4.7- s wait period (in the standard mode) must be created by the software after the bus is determined to be free. 7 6 5 4 3 2 1 0 sbicr2 0 0 0 1 1 0 0 0 releases the bus. if sbisr 0 checks that the scl pin is released. then if sbisr 1 checks that no other device is pulling the scl pin to the "l" level. then 4.7 s wait sbicr1 x x x 1 0 x x x selects the acknowledgment mode. sbidbr x x x x x x x x sets the desired slave address and direction. sbicr2 1 1 1 1 1 0 0 0 generates the start condition. (note) x: don't care (note) do not write to "0" when it is "0." (repeated start cannot be done.) fig. 14.6.5.1 timing chart of generating a repeated start ?0? ?0? ?0? ?1? ?1? ?1? ?1? ?1? scl (bus) scl pin sda pin 4.7 s (min.) start condition 9
tmp19a64c1d tmp19a64(rev1.1)- 14-22 14.7 control in the clock-sy nchronous 8-bit sio mode the following registers control the seri al bus interface in the clock-synchronous 8-bit sio mode and provide its status information for monitoring. serial bus interface control register 0 7 6 5 4 3 2 1 0 bit symbol sbien read/write r/w r after reset 0 0 0 0 0 0 0 0 function sbi operation 0: disable 1: enable : to use the sbi, enable the sbi operati on ("1") before setting each register of sbi module. (note) bits 0 to 6 of sbicro are read as "0." serial bus interface control register 1 7 6 5 4 3 2 1 0 bit symbol sios sioinh siom1 siom0 sck2 sck1 sck0 read/write r/w r r/w r/w after reset 0 0 0 0 1 0 0 1 function start transfer 0: stop 1: start abort transfer 0: continue 1: abort select transfer mode 00: transmit mode 01: (reserved) 10: transmit/receive mode 11: receive mode select serial clock frequency on writing : select serial clock frequency 000 001 010 011 100 101 110 n = 4 n = 5 n = 6 n = 7 n = 8 n = 9 n =10 1.69 844 422 211 105 53 26 mhz khz khz khz khz khz khz system clock : fsys (=54 mhz) clock gear : fc/1 frequency = [hz] 111 ? external clock (note) set to "0" and to "1" before programming the transfer mode and the serial clock. (note) after a reset, the bit is read as "1." if the sio mode is selected at the sbicr2 register, the initial value of the bit becomes "0." sbicr1 (0xffff_f250) sbicr0 (0xffff_f257) fs y s/2 2 n
tmp19a64c1d tmp19a64(rev1.1)- 14-23 serial bus interface data buffer register 7 6 5 4 3 2 1 0 bit symbol db7 db6 db5 db4 db3 db2 db1 db0 read/write r (receive)/w (transmit) after reset 0 fig. 14.7.1.1 sio mode registers serial bus interface control register 2 7 6 5 4 3 2 1 0 bit symbol sbim1 sbim0 read/write r w r after reset 1 1 1 1 0 0 1 1 function select serial bus interface operating mode 00: port mode 01: clock-synchronous 8-bit sio mode 10: i 2 c bus mode 11: (reserved) serial bus interface register 7 6 5 4 3 2 1 0 bit symbol siof sef read/write r r r after reset 1 1 1 1 0 0 1 1 function serial transfer status monitor 0: terminated 1: in progress shift operation status monitor 0: terminated 1: in progress serial bus interface baud rate register 0 7 6 5 4 3 2 1 0 bit symbol i2sbi read/write r r/w r r/w after reset 1 0 1 1 1 1 1 0 function idle 0: stop 1: operate make sure that you write "0." fig. 14.7.1.2 sio mode registers sbidbr (0xffff_f251) sbicr2 (0xffff_f253) sbisr (0xffff_f253) sbibr0 (0xffff_f254)
tmp19a64c1d tmp19a64(rev1.1)- 14-24 14.7.1 serial clock c clock source internal or external clocks can be se lected by programming sbicr1 . internal clocks in the internal clock mode, one of the seven frequenc ies can be selected as a serial clock, which is output to the outside through the sck pin. at the beginning of a transfer, the sck pin output becomes the "h" level. if the program cannot keep up with th is serial clock rate in writing the transmit data or reading the received data, the sbi automatically enters a wait pe riod. during this period, the serial clock is stopped automatically and the next shift operation is su spended until the proce ssing is completed. fig. 14.7.1.3 automatic wait external clock ( = "111") the sbi uses an external clock supplied from the outside to the sck pin as a serial clock. for proper shift operations, the serial clock at the "h " and "l" levels must have the pulse widths as shown below. fig. 14.7.1.4 maximum transfer frequency of external clock input sck pin output so pin output write the transmit data 3 1 7 2 8 1 2 6 7 8 1 2 3 c 0 a b c automatic wait a 0 a 1 a 2 a 5 a 6 a 7 b 0 b 5 b 6 b 7 c 1 c 2 b 1 b 4 t sckh t sckl , t sckh > 8/fsys sck pin t sck
tmp19a64c1d tmp19a64(rev1.1)- 14-25 d shift edge leading-edge shift is used in transmission. trailing-edge shift is used in reception. leading-edge shift data is shifted at the leading edge of the serial clock (or the falling edge of the sck pin input/output). trailing-edge shift data is shifted at the trailing edge of the se rial clock (or the rising edge of the sck pin input/output). fig. 14.7.1.5 shift edge bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 76543210 * 7654321 ** 765432 *** 76543 **** 7654 ***** 765 ****** 76 ****** 7 so pin bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 6543210 * 543210 ** 0 ******* 10 ****** 210 ***** 3210 **** 43210 *** ******** 76543210 sck pin shift register sck pin si pin shift register (a) leading-edge shift (b) trailing-edge shift (note) *: don't care
tmp19a64c1d tmp19a64(rev1.1)- 14-26 14.7.2 transfer modes the transmit mode, the receive mode or the transm it/receive mode can be selected by programming sbicr1 . c 8-bit transmit mode set the control register to the transmit m ode and write the transmit data to sbidbr. after writing the transmit data, writin g "1" to sbicr1 starts the transmission. the transmit data is moved from sbidbr to a shift register and out put to the so pin, with the least-significant bit (lsb) first, in synchronization with the serial clock. once the transm it data is transfer red to the shift register, sbidbr becomes empty, and the intsbi (buffer-empty) interrupt is generated, requesting the next transmit data. in the internal clock mode, the serial clock will be st opped and automatically ente r the wait state, if next data is not loaded after the 8-bit data has been fu lly transmitted. the wait state will be cleared when sbidbr is loaded with the next transmit data. in the external clock mode, sbidbr must be loaded with data before the next data shift operation is started. therefore, the data transfer rate varies depending on the maximum latency between when the interrupt request is generated and when sbidbr is lo aded with data in the in terrupt service program. at the beginning of transmission, the same value as in the last bit of the prev iously transmitted data is output in a period from setting sbisr to "1" to the falling edge of sck. transmission can be terminated by clearing to "0" or setting to "1" in the intsbi interrupt service program. if is cleared, re maining data is output before transmission ends. the program checks sbi0sr to determine whether transmission has come to an end. is cleared to "0" at the end of transmission. if is set to "1," the transmission is aborted immediately and is cleared to "0." in the external clock mode, must be set to "0" before the next transm it data shift operation is started. otherwise, operation will st op after dummy data is transmitted. 7 6 5 4 3 2 1 0 sbicr1 0 1 0 0 0 x x x selects the transmit mode. sbidbr x x x x x x x x writes the transmit data. sbicr1 1 0 0 0 0 x x x starts transmission. intsbi interrupt sbidbr x x x x x x x x writes the transmit data.
tmp19a64c1d tmp19a64(rev1.1)- 14-27 fig. 14.7.2.1 transmit mode example: example of programming (mips16) to te rminate transmission by (external clock) addiu r3, r0, 0x04 stest1 : lb r2, (sbisr) ; if sbisr = 1 then loop and r2, r3 bnez r2, stest1 addiu r3, r0, 0x20 stest2 : lb r2, (px) ; if sck = 0 then loop and r2, r3 beqz r2, stest2 addiu r3, r0, 0y00000111 stb r3, (sbicr1) ; 0 sbidbr intsbi interrupt request sck pin (output) so pin b a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 b 0 b 1 b 2 b 3 b 4 b 5 b 6 b 7 * is cleared a write the transmit data (a) internal clock sbidbr intsbi interrupt request sck pin (input) so pin b a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 b 0 b 1 b 2 b 3 b 4 b 5 b 6 b 7 * is cleared a write the transmit data (b) external clock
tmp19a64c1d tmp19a64(rev1.1)- 14-28 fig. 14.7.2.2 transmit data retentio n time at the end of transmission d 8-bit receive mode set the control register to the receive mode. then writing "1" to sbicr1 enables reception. data is taken into the shift regist er from the si pin, with the leas t-significant bit (lsb) first, in synchronization with the serial clock. once the shift regist er is loaded w ith the 8-bit da ta, it transfers the received data to sbidbr and the intsbi (buffe r-full) interrupt request is generated to request reading the received data. the in terrupt service program then read s the received data from sbidbr. in the internal clock mode, the serial clock will be stopped and automatically be in the wait state until the received data is read from sbidbr. in the external clock mode, shift operations are execut ed in synchronization with the external clock. the maximum data transfer rate varies, depending on the maximum latency between generating the interrupt request and re ading the received data. reception can be terminated by clearing to "0" or setting to "1" in the intsbi interrupt service program. if is cleared, r eception continues until all the bits of received data are written to sbidbr. the prog ram checks sbisr to dete rmine whether reception has come to an end. is cleared to "0" at the end of reception. af ter confirming the completion of the reception, last received data is read . if is set to "1," the reception is aborted immediately and is cleared to "0." (the received data beco mes invalid, and there is no need to read it out.) (note) the contents of sbidbr will not be retained after the transfer mode is changed. the ongoing reception must be completed by clearing to "0" and the last received data must be read before the transfer mode is changed. 7 6 5 4 3 2 1 0 sbicr1 0 1 1 1 0 x x x selects the receive mode. sbicr1 1 0 1 1 0 0 0 0 starts reception. intsbi interrupt reg. sbidbr reads the received data. bit 7 sck pin siof so pin bit 6 t sodh = min. 4/f sys /2 [s]
tmp19a64c1d tmp19a64(rev1.1)- 14-29 fig. 14.7.2.3 receive mode (example: internal clock) e 8-bit transmit/receive mode set the control register to the transfer/receive mode. then writin g the transmit data to sbidbr and setting sbicr1 to "1" enable s transmission and reception. the transmit data is output through the so pin at the falling of the serial clock, and the received data is taken in through the si pin at the rising of the serial clock, with the least-significant bit (lsb) first. on ce the shift register is loaded with the 8-bit data, it transfers the received data to sbidbr and the ints bi interrupt request is generated. the interrupt service program reads the received data from the data buffer register and writes the next transmit data. because sbidbr is shared between transmit and receive operations, the received data must be read before the next transmit data is written. in the internal clock operation, th e serial clock will be automatically in the wait state until the received data is read and the next transmit data is written. in the external clock mode, shift operations are exec uted in synchronization w ith the external serial clock. therefore, the received data must be read and the next transmit data must be written before the next shift operation is started. the maximum data tr ansfer rate for the external clock operation varies depending on the maximum latency between generati ng the interrupt request and reading the received data and writing the transmit data. at the beginning of transmission, the same value as in the last bit of the prev iously transmitted data is output in a period from setting to "1" to the falling edge of sck. transmission and reception ca n be terminated by clea ring to "0" or setting sbicr1 to "1" in the intsbi interrupt service program. if is cleared, transmission and reception continue until the received data is fully transferred to sbidbr. th e program checks sbisr to determine whether transmission and reception have come to an end. is cleared to "0" at the end of transmission and rece ption. if is set, the transmission and reception are aborted immediately and is cleared to "0." (note) the contents of sbid br will not be retained af ter the transfer mode is changed. the ongoing transmission and reception must be completed by clearing to "0" and the last received data must be read before the transfer mode is changed. sbidbr intsbi interrupt request sck pin (output) si pin b is cleared a a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 b 0 b 1 b 2 b 3 b 4 b 5 b 6 b 7 read the received data read the received data
tmp19a64c1d tmp19a64(rev1.1)- 14-30 fig. 14.7.2.4 transmit/receive mode (example: internal clock) fig. 14.7.2.5 transmit data retention time at the end of transmission/reception (in the transmit/receive mode) 7 6 5 4 3 2 1 0 sbicr1 0 1 1 0 0 x x x selects the transmit mode. sbidbr x x x x x x x x writes the transmit data. sbicr1 1 0 1 0 0 x x x starts reception/transmission. intsbi interrupt reg. sbiodbr reads the received data. sbidbr x x x x x x x x writes the transmit data. sbidbr intsbi interrupt request sck pin (output) so pin si pin is cleared c 0 c 1 c 2 c 3 c 4 c 5 c 6 c 7 d 0 d 1 d 2 d 3 d 4 d 5 d 6 d 7 write the transmit data (a) read the received data (d) a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 b 0 b 1 b 2 b 3 b 4 b 5 b 6 b 7 * d b c a read the received data (c) write the transmit data (b) bit 7 of the last word transmitted sck pin siof so pin bit 6 t sodh = min. 2/f sys /2 [s]
tmp19a64c1d tmp19a64(rev1.1)- 15-1 15. analog/digital converter a 10-bit, sequential-conversion analog/digital converter (a/d converter) is built into the tmp19a64. this a/d converter is equipped with 24 analog input channels. fig. 15.1 shows the block diagram of this a/d converter. these 24 analog input channels (pins an0 through an23) are also used as input ports. (note) if it is necessary to reduce a power current by operating the tmp19a64 in idle, sleep, slow or stop mode and if either case shown below is applicable, you must first stop the a/d converter and then execute the instruction to put the tmp19a64 into standby mode: 1) the tmp19a64 must be put into id le mode when admod1 is "0." 2) the tmp19a64 must be put into sleep, slow or stop mode. interrupt request intad ain23(p97) an15(p87) an7(p77) an0(p70) comparator vrefh vrefl internal data bus multiplexer sample hold admod1 scan repeat interrupt busy end start + ? internal data bus internal data bus channel select control circuit a/d conversion result register adreg08l-7fl adreg08h-7fh d/a converter admod0 admod2 admod3 top-priority ad conversion control interval end ad conversion result register adregsp comparator comparison register top-priority ad conversion completion interrupt ad monitor function interrupt ad monitor function control busy ad start control admod4 tb0 ads hpadce adscn vref tb9 normal a/d conversion control circuit fig. 15.1 a/d converter block diagram
tmp19a64c1d tmp19a64(rev1.1)- 15-2 15.1 control register the a/d converter is controlled by a/d mode control registers (admod0, admod1, admod2, admod3 and admod4). results of a/d conversion are stored in 16 upper and lower a/d conversion result registers adreg08h/l through adreg7fh/l. results of high-p riority conversion are stored in adregsph/l. fig. 15.1.1 shows the registers related to the a/d converter. a/d mode control register 0 7 6 5 4 3 2 1 0 bit symbol eocfn adbfn itm1 itm0 repeat scan ads read/write r r r/w after reset 0 0 0 0 0 0 0 0 function normal a/d conversion completion flag 0: before or during conversion 1: completion normal a/d conversion busy flag 0: conversion stop 1: during conversion "0" is read. specify interrupt in fixed channel repeat conversion mode specify interrupt in fixed channel repeat conversion mode specify repeat mode 0: single conversion mode 1: repeat conversion mode specify scan mode 0: fixed channel mode 1: channel scan mode start a/d conversion 0: don t care 1: start conversion "0" is always read. specify a/d conversion interrupt in fixed channel repeat conversion mode fixed channel repeat conversion mode = "0," = "1" 00 generate interrupt once every single conversion 01 generate interrupt once every 4 conversions 10 generate interrupt once every 8 conversions 11 setting prohibited a dmod0 (0xffff_f314) fig. 15.1.1 registers rela ted to the a/d converter
tmp19a64c1d tmp19a64(rev1.1)- 15-3 a/d mode control register 1 7 6 5 4 3 2 1 0 bit symbol vrefon i2ad adscn adch4 adch3 adch2 adch1 adch0 read/write r/w after reset 0 0 0 0 0 0 0 0 function vref application control 0: off 1: on idle 0: stop 1: activate specify operation mode for channel scanning 0: 4ch scan 1: 8ch scan select analog input channel select analog input channel 0 fixed channel 1 4 channel scan (adscn=0) 1 8 channel scan (adscn=1) 00000 an0 an0 an0 00001 an1 an0 to an1 an0 to an1 00010 an2 an0 to an2 an0 to an2 00011 an3 an0 to an3 an0 to an3 00100 an4 an4 an0 to an4 00101 an5 an4 to an5 an0 to an5 00110 an6 an4 to an6 an0 to an6 00111 an7 an4 to an7 an0 to an7 01000 an8 an8 an8 01001 an9 an8 to an9 an8 to an9 01010 an10 an8 to an10 an8 to an10 01011 an11 an8 to an11 an8 to an11 01100 an12 an12 an8 to an12 01101 an13 an12 to an13 an8 to an13 01110 an14 an12 to an14 an8 to an14 01111 an15 an12 to an15 an8 to an15 10000 an16 an16 an16 10001 an17 an16 to an17 an16 to an17 10010 an18 an16 to an18 an16 to an18 10011 an19 an16 to an19 an16 to an19 10100 an20 an20 an16 to an20 10101 an21 an20 to an21 an16 to an21 10110 an22 an20 to an22 an16 to an22 10111 an23 an20 to an23 an16 to an23 a dmod1 (0xffff_f315) (note 1) before starting ad conversion, write "1" to the bit, wait for 3 s during which time the internal re ference voltage should stabilize, and then write "1" to the admod0 bit. (note 2) to go into standby mode upon completion of ad conversion, set to "0." fig. 15.1.2 registers rela ted to the a/d converter
tmp19a64c1d tmp19a64(rev1.1)- 15-4 a/d mode control register 2 7 6 5 4 3 2 1 0 bit symbol eocfhp adbfhp hpadce hpadch4 hpadch3 hpadch2 hpadch1 hpadch0 read/write r r/w after reset 0 0 0 0 0 0 0 0 function top-priority ad conversion completion flag 0: before or during conversion 1: upon completion top-priority ad conversion busy flag 0: during conversion halts 1: during conversion activate top-priority ad conversion 0:don?t care 1: start conversion "0" is always read. select analog input channel when activating top-priority ad conversion analog input channel when executing top-priority ad conversion 00000 an0 00001 an1 00010 an2 00011 an3 00100 an4 00101 an5 00110 an6 00111 an7 01000 an8 01001 an9 01010 an10 01011 an11 01100 an12 01101 an13 01110 an14 01111 an15 10000 an16 10001 an17 10010 an18 10011 an19 10100 an20 10101 an21 10110 an22 10111 an23 a dmod2 (0xffff_f316) fig. 15.1.3 registers rela ted to the a/d converter
tmp19a64c1d tmp19a64(rev1.1)- 15-5 a/d mode control register 3 7 6 5 4 3 2 1 0 bit symbol adobic regs3 regs2 regs1 regs0 adobsv read/write r/w r r/w r/w r/w after reset 0 0 0 0 0 0 0 0 function write "0." "0" is read. make ad monitor function interrupt setting 0: smaller than comparison regi 1: larger than comparison regi bit for selecting the ad conversion result storage regi that is to be compared with the comparison regi if the ad monitor function is enabled ad monitor function 0: disable 1: enable ad conversion result storage regi to be compared 0000 adreg08 0001 adreg19 0010 adreg2a 0011 adreg3b 0100 adreg4c 0101 adreg5d 0110 adreg6e 0111 adreg7f 1xxx adregsp a dmod3 (0xffff_f317) a/d mode control register 4 7 6 5 4 3 2 1 0 bit symbol hadhs hadhtg adhs adhtg adrst1 adrst0 read/write r/w r w w after reset 0 0 0 0 0 0 0 function hw source for activating top-priority a/d conversion 0: inttb90 1: inttb91 hw for activating top-priority a/d conversion 0: disable 1: enable hw source for activating normal a/d conversion 0: inttb00 1: inttb01 hw for activating normal a/d conversion 0: disable 1: enable ?0? is read. overwriting 10 with 01 allows adc to be software reset. all registers except the adclk register are initialized. a dmod4 (0xffff_f318) (note 1) if ad conversion is executed with the match triggers and of a 16-bit timer set to "1" by using a source for triggering h/w, a/d conversion can be activated at specified intervals by performing three steps shown below when the timer is idle: c select a source for triggering hw: , d enable h/w activation of ad conversion: , e start the timer. (note 2) do not make a high-priority ad conv ersion setting and a normal ad conversion setting simultaneously. fig. 15.1.4 registers rela ted to the a/d converter
tmp19a64c1d tmp19a64(rev1.1)- 15-6 lower a/d conversion result register 08 7 6 5 4 3 2 1 0 bit symbol adr01 adr00 ovr0 adr0rf read/write r r r r after reset 0 0 1 1 1 1 0 0 function store lower 2 bits of a/d conversion result "1" is read. over run flag 0: not generate 1: generate a/d conversion result storage flag 1: presence of conversion result upper a/d conversion result register 08 7 6 5 4 3 2 1 0 bit symbol adr09 adr08 adr07 adr06 adr05 adr04 adr03 adr02 read/write r after reset 0 0 0 0 0 0 0 0 function store upper 8 bits of a/d conversion result lower a/d conversion result register 19 7 6 5 4 3 2 1 0 bit symbol adr11 adr10 ovr1 adr1rf read/write r r r r after reset 0 0 1 1 1 1 0 0 function store lower 2 bits of a/d conversion result "1" is read. over runflag 0: not generate 1: generate a/d conversion result storage flag 1: presence of conversion result upper a/d conversion result register 19 7 6 5 4 3 2 1 0 bit symbol adr19 adr18 adr17 adr16 adr15 adr14 adr13 adr12 read/write r after reset 0 0 0 0 0 0 0 0 function store upper 8 bits of a/d conversion result 9 876543210 converted channel x value 7 6543210 7654 3 2 1 0 a dreg08h (0xffff_f301) a dreg19h (0xffff_f303) a dregxh adregx l a dreg08l (0xffff_f300) a dreg19l (0xffff_f302) fig. 15.1.5 registers rela ted to the a/d converter ? values read from bits 5 through 2 of registers adreg08l and adreg19l are always "1." ? bit 0 of registers adreg08l and adreg19l is the a/d conversi on result storage flag . this bit is set to "1" after an a/d converted value is stored. a read of a lo wer register (adregxl) clears this bit to "0." ? bit 1 of registers adreg08l and adreg19l is the over run flag . this bit is set to "1" if a conversion result is overwritten before both conversion result storage registers (adregxh and adregxl) are read. a read of a flag will clear this bit to "0." ? when reading conversion result storage registers, first read upper registers and then lower registers.
tmp19a64c1d tmp19a64(rev1.1)- 15-7 lower a/d conversion result register 2a 7 6 5 4 3 2 1 0 bit symbol adr21 adr20 ovr2 adr2rf read/write r r r r after reset 0 0 1 1 1 1 0 0 function store lower 2 bits of a/d conversion result "1" is read. over run flag 0: not generate 1: generate a/d conversion result storage flag 1: presence of conversion result upper a/d conversion result register 2a 7 6 5 4 3 2 1 0 bit symbol adr29 adr28 adr27 adr26 adr25 adr24 adr23 adr22 read/write r after reset 0 0 0 0 0 0 0 0 function store upper 8 bits of a/d conversion result lower a/d conversion result register 3b 7 6 5 4 3 2 1 0 bit symbol adr31 adr30 ovr3 adr3rf read/write r r r r after reset 0 0 1 1 1 1 0 0 function store lower 2 bits of a/d conversion result "1" is read. over run flag 0: not generate 1: generate a/d conversion result storage flag 1: presence of conversion result upper a/d conversion result register 3b 7 6 5 4 3 2 1 0 bit symbol adr39 adr38 adr37 adr36 adr35 adr34 adr33 adr32 read/write r after reset 0 0 0 0 0 0 0 0 function store upper 8 bits of a/d conversion result 9 8 7 6 5 4 3 2 1 0 converted channel x value 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 a dreg2ah (0xffff_f305) a dreg3bh (0xffff_f307) a dregxh adregxl a dreg2al (0xffff_f304) a dreg3bl (0xffff_f306) ? values read from bits 5 through 2 of registers adreg2al and adreg3bl are always "1." ? bit 0 of registers adreg2al and adreg3bl is the a/d conversion result storage flag . this bit is set to "1" after an a/d converted value is stored. a read of a lower register (adregxl) clears this bit to "0." ? bit 1 of registers adreg2al and adreg3bl is the over run flag . this bit is set to "1" if a conversion result is overwritten before both conversion result storage registers (adr egxh and adregxl) are read. a read of a flag will clear this bit to "0." ? when reading conversion result storage registers, fi rst read upper registers and then lower registers. fig. 15.1.6 registers rela ted to the a/d converter
tmp19a64c1d tmp19a64(rev1.1)- 15-8 lower a/d conversion result register 4c 7 6 5 4 3 2 1 0 bit symbol adr41 adr40 ovr4 adr4rf read/write r r r r after reset 0 0 1 1 1 1 0 0 function store lower 2 bits of a/d conversion result "1" is read. over run flag 0: not generate 1: generate a/d conversion result storage flag 1: presence of conversion result upper a/d conversion result register 4c 7 6 5 4 3 2 1 0 bit symbol adr49 adr48 adr47 adr46 adr45 adr44 adr43 adr42 read/write r after reset 0 0 0 0 0 0 0 0 function store upper 8 bits of a/d conversion result lower a/d conversion result register 5d 7 6 5 4 3 2 1 0 bit symbol adr51 adr50 ovr5 adr5rf read/write r r r r after reset 0 0 1 1 1 1 0 0 function store lower 2 bits of a/d conversion result "1" is read. over run flag 0: not generate 1: generate a/d conversion result storage flag 1: presence of conversion result upper a/d conversion result register 5d 7 6 5 4 3 2 1 0 bit symbol adr59 adr58 adr57 adr56 adr55 adr54 adr53 adr52 read/write r after reset 0 0 0 0 0 0 0 0 function store upper 8 bits of a/d conversion result 9 8 76543210 converted channel x value 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 a dreg4ch (0xffff_f309) a dreg5dh (0xffff_f30b) a dregxh adregxl a dreg5dl (0xffff_f30a) a dreg4cl (0xffff_f308) ? values read from bits 5 through 2 of registers adreg4cl and adreg5dl are always "1." ? bit 0 of registers adreg4cl and adreg5dl is the a/d conversion result storage flag . this bit is set to "1" after an a/d converted value is stored. a read of a lower register (adregxl) clears this bit to "0." ? bit 1 of registers adreg4cl and adreg5dl is the over run flag . this bit is set to "1" if a conversion result is overwritten before both conversion result storage registers (adregxh and adregxl) are read. a read of a flag will clear this bit to "0." ? when reading conversion result storage registers, first read upper registers and then lower registers. fig. 15.1.7 registers rela ted to the a/d converter
tmp19a64c1d tmp19a64(rev1.1)- 15-9 lower a/d conversion result register 6e 7 6 5 4 3 2 1 0 bit symbol adr61 adr60 ovr6 adr6rf read/write r r r r after reset 0 0 1 1 1 1 0 0 function store lower 2 bits of a/d conversion result "1" is read. over run flag 0: not generate 1: generate a/d conversion result storage flag 1: presence of conversion result upper a/d conversion result register 6e 7 6 5 4 3 2 1 0 bit symbol adr69 adr68 adr67 adr66 adr65 adr64 adr63 adr62 read/write r after reset 0 0 0 0 0 0 0 0 function store upper 8 bits of a/d conversion result lower a/d conversion result register 7f 7 6 5 4 3 2 1 0 bit symbol adr71 adr70 ovr7 adr7rf read/write r r r r after reset 0 0 1 1 1 1 0 0 function store lower 2 bits of a/d conversion result "1" is read. over runflag 0: not generate 1: generate a/d conversion result storage flag 1: presence of conversion result upper a/d conversion result register 7f 7 6 5 4 3 2 1 0 bit symbol adr79 adr78 adr77 adr76 adr75 adr74 adr73 adr72 read/write r after reset 0 0 0 0 0 0 0 0 function store upper 8 bits of a/d conversion result 9 8 76543210 converted channel x value 7 6543210 7654 3 2 1 0 a dreg6eh (0xffff_f30d) a dreg7fh (0xffff_f30f) a dregxh adregxl a dreg6el (0xffff_f30c) a dreg7fl (0xffff_f30e) ? values read from bits 5 through 2 of registers adreg6el and adreg7fl are always "1." ? bit 0 of registers adreg6el and adreg7fl is the a/d conversion result storage flag . this bit is set to "1" after an a/d converted value is stored. a read of a lower register (adregxl) clears this bit to "0." ? bit 1 of registers adreg6el and adreg7fl is the over run flag . this bit is set to "1" if a conversion result is overwritten before both conversion result storage registers (adregxh and adregxl) are read. a read of a flag will clear this bit to "0." ? when reading conversion result storage registers, first read upper registers and then lower registers. fig. 15.1.8 registers rela ted to the a/d converter
tmp19a64c1d tmp19a64(rev1.1)- 15-10 lower a/d conversion result register sp 7 6 5 4 3 2 1 0 bit symbol adrsp1 adrsp0 ovrsp adrsprf read/write r r r r after reset 0 0 1 1 1 1 0 0 function store lower 2 bits of a/d conversion result "1" is read. over run flag 0: not generate 1: generate a/d conversion result storage flag 1: presence of conversion result upper a/d conversion result register sp 7 6 5 4 3 2 1 0 bit symbol adrsp9 adrsp8 adrsp7 adrsp6 adrsp5 adrsp4 adrsp3 adrsp2 read/write r after reset 0 0 0 0 0 0 0 0 function store upper 8 bits of a/d conversion result 9 8 76543210 converted channel x value 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 a dregsph (0xffff_f311) a dregxh adregxl a dregspl (0xffff_f310) ? values read from bits 5 through 2 of register adregspl are always "1." ? bit 0 of register adregspl is the a/d conversion result storage flag . this bit is set to "1" after an a/d converted value is stored. a read of a lower register (adregxl) clears this bit to "0." ? bit 1 of register adregspl is the over run flag . this bit is set to "1" if a conversion result is overwritten before both conversion result storage registers (adregxh and adregxl) are read. a read of a flag will clear this bit to "0." ? when reading conversion result storage registers, first read upper registers and then lower registers. fig. 15.1.9 registers rela ted to the a/d converter
tmp19a64c1d tmp19a64(rev1.1)- 15-11 lower a/d conversion result comparison register 7 6 5 4 3 2 1 0 bit symbol adr21 adr20 read/write r/w r after reset 0 0 0 0 0 0 0 0 function store lower 2 bits of a/d conversion result comparison "0" is read. upper a/d conversion result comparison register 7 6 5 4 3 2 1 0 bit symbol adr29 adr28 adr27 adr26 adr25 adr24 adr23 adr22 read/write r/w after reset 0 0 0 0 0 0 0 0 function store upper 8 bits of a/d conversion result comparison a dcomregh (0xffff_f313) a dcomreg (0xffff_f312) (note) to set or change a value in this register, the ad monitor function must be disabled (admod3="0"). fig. 15.1.10 registers rela ted to the a/d converter
tmp19a64c1d tmp19a64(rev1.1)- 15-12 15.2 conversion clock z the conversion time is calculated based on the 41 conversion clock and the sample hold time. a/d conversion clock setting register 7 6 5 4 3 2 1 0 bit symbol tsh2 tsh1 tsh0 adclk2 adclk1 adclk0 read/write r/w r/w r/w r/w r r/w r/w r/w after reset 0 0 0 0 0 0 1 1 function write "0." select the a/d sample hold time 000:12 conversion clock 001:12 2 conversion clock 010: 12 3 conversion clock 011: 12 4 conversion clock 100: 12 16 conversion clock 101: 12 64 conversion clock 110: 12 256 conversion clock 111: 12 1024 conversion clock select the a/d prescaler output 000: fc 001: fc/2 010: fc/4 011: fc/8 100: fc/16 111:reserved a dclk (0xffff_f31c) conversion clock sample hold time tconv. conversion clk*12*1 (1.78 us) 7.85 us conversion clk*12*2 (3.56 us) 9.63 us conversion clk*12*3 (5.33 us) 11.4 us conversion clk*12*4 (7.11 us) 13.2 us conversion clk*12*16 (28.4 us) 34.5 us conversion clk*12*64 (114 us) 120 us conversion clk*12*256 (455 us) 461 us 6.75 mhz conversion clk*12*1024 (1.82 ms) 1.83 ms 1 2 4 8 16 fc adclk2:0 adclk
tmp19a64c1d tmp19a64(rev1.1)- 15-13 15.3 description of operations 15.3.1 analog reference voltage the "h" level of the analog reference voltage shall be applied to the vrefh pin, and the "l" level shall be applied to the vrefl pin. by writing "0" to the ad mod1 bit, a switched-on state of vrefh- vrefl can be turned into a switched-off state. to star t ad conversion, make sure that you first write "1" to the bit, wait for 3 s during which time the internal reference voltage should stabilize, and then write "1" to the admod0 bit. 15.3.2 selecting the analog input channel how the analog input channel is selected is differ ent depending on a/d converter operation mode used. (1) normal ad conversion mode ? if the analog input channel is used in a fixed state (admod0 = "0"): one channel is selected from analog input pins ain0 through ain23 by setting admod1 to an appropriate setting. ? if the analog input channel is used in a scan state (admod0 = "1"): one scan mode is selected from 24 scan modes by setting admod1 and adscn to appropriate settings. (2) high-priority ad conversion mode one channel is selected from analog input pins ain0 through ain23 by setting admod2 to an appropriate setting. after a reset, admod0 is initialized to "0 " and admod1 is initialized to "0000." this initialization works as a trigger to select a fixed channel input through the an0 pin. the pins that are not used as analog input channels can be used as ordinary input ports. if high-priority ad conversion is activated during normal ad conversion, normal ad conversion is discontinued, high-priority ad conversion is executed and completed, and then normal ad conversion is resumed. example: a case in which repeat-scan conversion is ongoing at channels ain0 through ain3 with admod0 set to "11" and admod1 set to 00011, and high-priority ad conversion has been activated at ain15 with admod2=01111: ch0 ch1 ch2 ch15 ch2 ch3 ch0 top-priority ad has been activated conversion ch
tmp19a64c1d tmp19a64(rev1.1)- 15-14 15.3.3 starting a/d conversion two types of a/d conversion are supported: normal ad conversion and high-priority ad conversion. normal ad conversion is software activated by setting admod0 to "1." high-priority ad conversion is software activated by setting admod2 to "1." 4 operation modes are made available to normal ad conversion. in performing normal ad conversion, one of these operation modes must be selected by setting admod0<2:1> to an appropriate setting. for high-priority ad conversion, only one operation mode can be used: fixed channel single conversion mode. normal ad conversion can be activated using the hw activation source se lected by admod4, and high-priority ad conversion can be activated using the hw activation s ource selected by admod4. if this bit is "0," normal ad conversion is activated in response to inttb00 generated by the 16-bit timer 0, and high- priority ad conversion is activated in response to intt b90 generated by the 16-bit timer 9. if this bit is "1," normal ad conversion is activated in response to inttb01 generated by the 16-bit timer 0, and high- priority ad conversion is activated in response to inttb91 generated by the 16-bit timer 9. software activation is still valid even after h/w activation has been authorized. when normal a/d conversion starts, the a/d conversion busy flag (admod0) showing that a/d conversion is under way is set to "1." when high-pri ority a/d conversion starts , the a/d conversion busy flag (admod2) showing that a/d conversion is under way is set to "1." if normal a/d conversion is interrupted by high-priority a/d conversion, the value of the busy flag for normal a/d conversion before the start of high-priority a/d conversion is retained. the value of the conversion completion flag eocfn for normal a/d conversion befo re the start of high-pri ority a/d conversion can also be retained. (note) normal a/d conversion must not be activated when high-priority a/d conversion is under way. if activated when high-priority a/d conversion is under way, the high-priority a/d conversion completion flag cannot be set, and the flag for previous normal a/d conversion cannot be cleared. to reactivate normal a/d conversion, a software re set (admod4) must be performed before starting a/d conversion. the hw activation method must not be used to reactivate normal a/d conversion. if admod2 is set to "1" during normal a/d conversion, ongoing a/d conversion is discontinued and high-priority a/d conversion starts; specifically, a/d conversion (fixed channel single conversion) is executed for a channel designated by ad mod2<3:0>. after the result of this high-priority a/d conversion is stored in the storage register adregsp, normal a/d conversion is resumed. if hw activation of high-priority a/d conversion is authorized during normal a/d conversion, ongoing a/d conversion is discontinued when requirements for activation using a resource are met, and high- priority a/d conversion (fixed channel single conversion) starts for a channel designated by admod2<3:0>. after the result of this high-priority a/d conversion is stored in the storage register adregsp, normal a/d conversion is resumed.
tmp19a64c1d tmp19a64(rev1.1)- 15-15 15.3.4 a/d conversion modes and a/d conversion completion interrupts for a/d conversion, the following four operation modes are supported. for normal a/d conversion, an operation mode can be selected by setting admod0<2:1> to an appropriate setting. for high-priority a/d conversion, the fixed channel single conversion mode is automatically selected, irrespective of the admod0<2:1> setting. ? fixed channel single conversion mode ? channel scan single conversion mode ? fixed channel repeat conversion mode ? channel scan repeat conversion mode (1) normal a/d conversion an operation mode is selected with admod0< repeat, scan>. as a/d conversion starts, admod0 is set to "1." when specified a/d conversion is completed, the a/d conversion completion interrupt (intad) is generated, and admod0 showing the completion of a/d conversion is set to "1." if ="0," returns to "0" concurrently with the setting of eocf. if is set to "1," remains at "1" and a/d conversion continues. c fixed channel single conversion mode if admod0 is set to "00," a/ d conversion is performed in the fixed channel single conversion mode. in this mode, a/d conversion is performed once for one channel selected. after a/d conversion is completed, admod0 is set to "1," admod0< adbf> is cleared to "0," and the interrupt request intad is generated. is cleared to "0" upon read. d channel scan single conversion mode if admod0 is set to "01," a/d conversion is performed in the channel scan single conversion mode. in this mode, a/d conversion is performed once for each scan channel selected. after a/d scan conversion is completed, admod0 is se t to "1," admod0 is cleared to "0," and the interrupt request intad is generate d. is cleared to "0" upon read. e fixed channel repeat conversion mode if admod0 is set to "10," a/d conversion is performed in fixed channel repeat conversion mode. in this mode, a/d conversion is performed repeatedly for one channel selected. after a/d conversion is completed, admod is se t to "1." admod0 is not cleared to "0." it remains at "1." the timing with which the interrupt request intad is generated can be selected by setting admod0 to an appropriate setting. is set with the same timing as this interrupt intad is generated. is cleared to "0" upon read. with set to "00," an interrupt request is generated each time one a/d conversion is completed. in this case, the conversion results ar e always stored in the storage register adreg08. after the conversion result is stored, eocf changes to "1." with set to "01," an interrupt request is generated each time four a/d conversion are completed. in this case, the conversion results are sequentially stored in storage registers adreg08 through adreg3b. after the conversion results are stored in adreg3b, is set to "1," and the storage of subsequent conver sion results starts from adreg08. is cleared to "0" upon read.
tmp19a64c1d tmp19a64(rev1.1)- 15-16 with set to "10," an interrupt request is generated each time eight a/d conversions are completed. in this case, the conversion results are sequentially stored in storage registers adreg08 through adreg7f. after the conversion results are stored in adreg7f, is set to "1," and the storage of subsequent conversion results starts from adreg08. is cleared to "0" upon read. f channel scan repeat conversion mode if admod0 is set to "11," a/d conversion is performed in the channel scan repeat conversion mode. in this mode, a/d conversion is performed repeatedly for a scan channel selected. each time one a/d scan conversion is completed, admod0 is set to "1," and the interrupt request intad is generated. admod0 is not clear ed to "0." it remains at "1." is cleared to "0" upon read. to stop the a/d conversion operation in the repeat conversion mode (modes described in e and f above), write "0" to admod0 . when ongoing a/d conversion is completed, the repeat conversion mode terminates, and admod0 is set to "0." (2) high-priority a/d conversion high-priority a/d conversion is performed only in fixed channel single conversion mode. the admod0 setting has no relevance to the high-priority a/d conversion operations or preparations. as ac tivation requirements are met, a/ d conversion is performed only once for a channel designated by admod2. after the a/d conversion is completed, the high-priority a/d conversi on completion interrupt is generated, admod2 is set to "1," and re turns to "0." the eocfhp flag is cleared upon read.
tmp19a64c1d tmp19a64(rev1.1)- 15-17 relationships between a/d conversion modes, in terrupt generation timings and flag operations admod0 conversion mode interrupt generation timing eocf setting timing (see note) adbf (after the interrupt is generated) itm1:0 repeat scan fixed channel single conversion after conversion is completed after conversion is completed 0 ? 0 0 each time one conversion is completed after one conversion is completed 1 00 each time four conversions are completed after four conversions are completed 1 01 fixed channel repeat conversion each time eight conversions are completed after eight conversions are completed 1 10 1 0 channel scan single conversion after scan conversion is completed after scan conversion is completed 1 ? 0 1 channel scan repeat conversion each time one scan conversion is completed after one scan conversion is completed 1 ? 1 1 (note) eocf is cleared upon read. fig. 15.3.4.1 relationships between a/d conversi on modes, interrupt generation timings and flag operations
tmp19a64c1d tmp19a64(rev1.1)- 15-18 15.3.5 high-priority conversion mode by interrupting ongoing normal a/d conversion, high-priority a/d conversion can be performed. high- priority a/d conversion can be software activat ed by setting admod2 to "1" or it can be activated using the hw resource by setting admod4<7:6> to an appropriate setting. if high-priority a/d conversion has been activated during normal a/d conversion, ongoing normal a/d conversion is interrupted, and single conversion is performed for a channel designated by admod2<3:0>. the result of single conversion is stored in adregsp, and the high-priority a/d conversion interrupt is generated. after high-priority a/d conversion is completed, normal a/d conversion is resumed; the status of normal a/d conversion immediately before being interrupted is maintained. high-priority a/d conversion activated while high-priority a/d conversion is under way is ignored. for example, if channel repeat conversion is activated for channels an0 through an8 and if is set to "1" during an3 conversion, an3 conversion is suspended, and conversion is performed for a channel designated by . after the result of conversion is stored in adregsp, channel repeat conversion is resumed, starting from an3. 15.3.6 a/d monitor function if admod3 is set to "1," the a/d monitor f unction is enabled. if the value of the conversion result storage register specified by regs<3:0> become s larger or smaller ("larger" or "smaller" to be designated by adobic) than the value of a comparison register, the a/d monitor function interrupt is generated. this comparison operation is performe d each time a result is stored in a corresponding conversion result storage register, and the interrupt is generated if the conditions are met. because storage registers assigned to perform the a/d monitor function are usually not read by software, overrun flag is always set and the conversion result storage flag is also set. to use the a/d monitor function, therefore, a flag of a corresponding conversion result storage register must not be used. 15.3.7 a/d conversion time by setting adclk to an appropriate setting, one a/d conversion clock can be selected for fc, fc/2, fc/4, fc/8 and fc/16 (ad pres caler outputs). to achieve the guara nteed accuracy, the a/d conversion clock must be 6.75 mhz or less, that is, the a/d conversion time must be 7.85 s or longer. 15.3.8 storing and reading a/d conversion results a/d conversion results are stored in upper and lowe r a/d conversion result registers for normal a/d conversion (adreg08h/l through adrg7fh/l). in fixed channel repeat conversion mode, a/d conversion results are sequentially stored in adreg08h/l through adreg7fh/l. if is so set as to generate the interrup t each time one a/d conversion is completed, conversion results are stored only in adreg 08h/l. if is so set as to generate the interrupt each time four a/d conversions are complete d, conversion results are sequentially stored in adreg08h/l through adreg3bh/l. table 15.3.8.1 shows analog input channels and related a/d conversion result registers.
tmp19a64c1d tmp19a64(rev1.1)- 15-19 table 15.3.8.1 analog input channels and re lated a/d conversion result registers a/d conversion result register analog input channel conversion modes other than shown to the right fixed channel repeat conversion mode (every one conversion) fixed channel repeat conversion mode (every four conversions) fixed channel repeat conversion mode (every eight conversions) an0 adreg08h/l an1 adreg19h/l an2 adreg2ah/l an3 adreg3bh/l an4 adreg4ch/l an5 adreg5dh/l an6 adreg6eh/l an7 adreg7fh/l an8 adreg08h/l an9 adreg19h/l an10 adreg2ah/l an11 adreg3bh/l an12 adreg4ch/l an13 adreg5dh/l an14 adreg6eh/l an15 adreg7fh/l an16 adreg08h/l an17 adreg19h/l an18 adreg2ah/l an19 adreg3bh/l an20 adreg4ch/l an21 adreg5dh/l an22 adreg6eh/l an23 adreg7fh/l adreg08h/l fixed a dreg08h/l a dreg3bh/l a dreg08h/l a dreg7fh/l 15.3.9 data polling to process a/d conversion results without using inte rrupts, admod0 must be polled. if this flag is set, conversion results are stored in a specified a/ d conversion result register. after confirming that this flag is set, read that conversion result storage register. in reading the register, make sure that you first read upper bits and then lower bits to detect an overrun. if ovrn is "0" and adrnrf is "1" in lower bits, a correct conversion result has been obtained.
tmp19a64c1d 16. watchdog timer (runaway detection timer) the tmp19a64 has a built-in watchdog timer for detecting runaways. the watchdog timer (wdt) is for detecting malfunctions (runaways) of the cpu caused by noises or other disturbances and remedying them to return the cpu to normal operation. if the timer detects a runaway, it generates a non-maskable interrupt to notify the cpu. by connecting the output of the watchdog timer to a reset pin (inside the chip), it is possible to force the watchdog timer to reset itself. 16.1 configuration fig. 16.1 shows the block diagram of the watchdog timer. internal reset wdmod wdmod reset watchdog timer control register wdcr q r s binary counter (22 stages) internal reset wdmod interrupt request intwdt f sys /2 selector write b1h write 4eh 2 22 /fs y s 2 20 /fs y s 2 18 /fs y s 2 16 /fs y s reset control reset pin internal data bus fig. 16.1 block diagram of the watchdog timer tmp19a64(rev1.1)- 16-1
tmp19a64c1d 16.2 watchdog timer interrupt the watchdog timer consists of the binary counters th at are arranged in 22 stages and work using the f sys/2 system clock as an input clock. the outputs produced by these binary counters are 2 15 , 2 17 , 2 19 and 2 21 . by selecting one of these outputs with wdmod , a watchdog timer interrupt can be generated when an overflow occurs, as shown in fig. 16.2.1. because the watchdog timer interrupt is a non-maskable interrupt f actor, nmiflg at the intc performs a task of identifying it. 0 wdt interrupt wdt clear (software) write of a clear code overflow n wdt counter fig. 16.2.1 normal mode when an overflow occurs, resetting the chip itself is an opti on to choose. if the chip is reset, a reset is effected for a 32-state time, as shown in fig. 16.2.2. if this reset is effected, the clock f sys that the clock gear generates by dividing the clock f c of the high-speed oscillator by 8 is used as an input clock f sys/2 . overflow wdt counter n wdt interrupt internal reset 32-state (9.48 s @ f c = 54 mhz, f sys = 6.75 mhz, f sys/2 = 3.375 mhz) fig. 16.2.2 reset mode (note 1) when the watchdog timer functions to effect a reset, sampling of the status of the plloff pin still continues. therefore, use the p lloff pin at the level fixed to "h." (note 2) if the watchdog timer is operated when the high-frequency oscillator is idle, the system reset operation initiated by the watchdog timer becomes erratic due to the unstable oscillation of the high-frequency oscillator. therefore, do not operate the watchdog timer when the high-frequency oscillator is idle. tmp19a64(rev1.1)- 16-2
tmp19a64c1d 16.3 control registers the watchdog timer (wdt) is controlled by two control registers wdmod and wdcr. 16.3.1 watchdog timer mode register (wdmod) c specifying the detection time of the watchdog timer this is a 2-bit register for specifying the watc hdog timer interrupt time for runaway detection. when a reset is effected, this register is initialized to wdmod = "00." fig. 16.3.1.1 shows the detection time of the watchdog timer. d enabling/disabling the watchdog timer when reset, wdmod is initialized to "1" and the watchdog timer is enabled. to disable the watchdog timer, this bit must be set to "0" and, at the same time, the disable code (b1h) must be written to the wdcr register. this dual setting is intended to minimize the probability that the watchdog timer may inadvertently be disabled if a runaway occurs. to change the status of the watchdog timer from "d isable" to "enable," set the bit to "1." e watchdog timer out reset connection this register is used to make a non-maskable interrupt (intwdt) setting associated with the detection of a runaway or to make a connection setting after an internal reset. after a reset, wdmod is initialized to "0," and a non-m askable interrupt setting is established. for information on the status of non-maskable inte rrupts, refer to the nmiflg register which is described in chapter 6 "interrupts." tmp19a64(rev1.1)- 16-3
tmp19a64c1d 7 6 5 4 3 2 1 0 bit symbol wdte wdtp1 wdtp0 i2wdt rescr ? read/write r/w r/w r r r/w r/w after reset 1 0 0 0 0 0 0 0 function wdt control 0: disable 1: enable selects wdt detection time 00: 2 16 /f sys 01: 2 18 /f sys 10: 2 20 /f sys 11: 2 22 /f sys i d l e 0: stop 1: start selects internal reset 0: connects nmi 1: connects internal reset write "0." wdmod (0xffff_f090) watchdog timer out control 0 nmi interrupt 1 connects wdt out to internal reset detection time of watchdog timer wdmod syscr1 clock gear value 00 01 10 11 000 (fc) 1.2 ms 4.9 ms 19.4 ms 77.7 ms 100 (fc/2) 2.4 ms 9.7 ms 38.8 ms 155.3 ms 110 (fc/4) 4.9 ms 19.4 ms 77.7 ms 310.7 ms 111 (fc/8) 9.7 ms 38.8 ms 155.3 ms 621.4 ms 0 disable 1 enable detection time of watchdog timer @ fc = 54 mhz enable/disable control of the watchdog timer fig. 16.3.1.1 watchdog timer mode register tmp19a64(rev1.1)- 16-4
tmp19a64c1d 16.3.2 watchdog timer control register (wdcr) this is a register for disabling the watchdog timer function and controlling the clearing function of the binary counter. ? disabling control by writing the disable code (b1h) to this wdcr register after setting wdmod to "0," the watchdog timer can be disabled. wdmod 0 ? ? ? ? ? ? ? clears wdte to "0." wdcr 1 0 1 1 0 0 0 1 writes the disable code (b1h). ? enabling control set wdmod to "1." ? watchdog timer clearing control writing the clear code (4eh) to the wdcr register clears the binary counter and allows it to resume counting. wdcr 0 1 0 0 1 1 1 0 writes the clear code (4eh). (note) writing the disable code (bih) clears the binary counter. 7 6 5 4 3 2 1 0 bit symbol ? read/write w after reset ? function b1h : wdt disable code 4eh : wdt clear code others: disabled this is a write-only register. if each bit is read, "0" is returned. wdcr (0xffff_f091) disable & clear of wdt b1h disable code 4eh clear code others ? fig. 16.3.2.1 watchdog timer control register tmp19a64(rev1.1)- 16-5
tmp19a64c1d 16.4 operation description the watchdog timer generates the intwd interrupt after a lapse of the detection time specified by the wdmod register. before generating the intw d interrupt, the binary counter for the watchdog timer must be cleared to "0" using software (instructi on). if the cpu malfunctions (runs away) due to noise or other disturbances and cannot execute the instruction to clear the binary counter, the binary counter overflows and the intwd interrupt is generated. the cpu is able to recognize the occurrence of a malfunction (runaway) by identifying the intwd interrupt and to restore the faulty condition to normal by using a malfunction (runaway) countermeasure program. additionally, it is possible to resolve the problem of a malfunction (runaway) of the cpu by connecting the watchdog timer out pin to reset pins of peripheral devices. the watchdog timer begins operation im mediately after a reset is cleared. in stop mode, the watchdog timer is reset and in an idle state. when the bus is open ( busak = "l"), it continues counting. in idle mode, its operation de pends on the wdmod setting. before putting it in idle mode, wdmod must be set to an appropriate setting, as required. examples: c to clear the binary counter 7 6 5 4 3 2 1 0 wdcr 0 1 0 0 1 1 1 0 writes the clear code (4eh) d to set the detection time of the watchdog timer to 2 18 /f sys 7 6 5 4 3 2 1 0 wdmod 1 0 1 ? ? ? ? ? e to disable the watchdog timer 7 6 5 4 3 2 1 0 wdmod 0 ? ? ? ? ? ? ? clears wdte to "0" wdcr 1 0 1 1 0 0 0 1 writes the disable code (b1h) note: if the watchdog timer is operated when the high-frequency oscillator is idle, the system reset operation initiated by the watchdog timer becomes erratic due to the unstable oscillation of the hi gh-frequency oscillator. therefore, do not operate the watchdog timer when the high-frequency oscillator is idle. tmp19a64(rev1.1)- 16-6
tmp19a64c1d 17. backup module (clock timer, backup ram) 17.1 features the tmp19a64 has a backup module (backup mode) with a built-in timer dedicated to clock operations and a built-in backup ram. using this backup module, th e tmp19a64 can operate in low-power-consumption operation modes. specifically, power to all blocks (cpu, peripheral i/os, etc.) except the backup module is disconnected; because only the backup module is supplied with power, it is possible to reduce the amount of consumption current greatly. 17.2 block diagram fig. 17.2 shows the block diagram of the backup module. low-speed oscillation circuit 512byte b-up ram clock timer other blocks cpu back-up module backup i/f tx19a64 dvcc reset breset bupmd bvcc xt1 intrtc fig. 17.2 block diagram of the backup module tmp19a64(rev1.1)- 17-1
tmp19a64c1d precautions for the use of the backup module: z low-speed oscillation starts when the backup module (bvcc) is powered on. the software start or stop of low-speed oscillation is not permitted. z to put the tmp19a64 in backup mode or normal operation mode, necessary settings must be made. z when the backup module is operating in slow mode, access to the backup ram is prohibited. z the functions that can be initialized with breset are as follows: clock timer: initialize backup ram: undefined backup module reset flag: initialize registers in the backup module (rtcflg, rtccr, rtcreg) low-speed oscillator: continued oscillation z if the backup module and the low-frequency oscillato r are not used, the following settings must be made: power supply level: bvcc, breset gnd level: xt1, bupmd 17.3 backup mode a backup mode is provided as a system operation mode. in backup mode, the power to all blocks except the backup module is disconnected so that the tmp19a64 can operate with low power consumption. fig. 17.3 is the state transition diagram showing a transition to the backup mode. slow/sleep mode normal mode a ll blocks are powered on during the full- power operation. some blocks are powered on during the low-speed operation. backup mode during the low-speed operation, only the backup power supply is powered on, only the clock timer is operating, and the ram data is retained. dvcc on reset all blocks other than bvcc are shut down. bupmd input fig. 17.3 block diagram of the backup module tmp19a64(rev1.1)- 17-2
tmp19a64c1d 17.4 backup mode operation 17.4.1 transition to backup mode to put the tmp19a64 into backup mode, first set the backup mode trigger pin (bupmd) to "0," and then cut off the main power supply (dvcc3, dvcc15). when performing these two steps, caution must be used because there is the possibility that data is bein g written to the backup ram. therefore, steps must be performed according to the sequence shown below. additionally, to reco ver from backup mode, the power must be turned on and signals must be processed according to the sequence shown below. c dvcc15 dvcc3 (internal power supply) e d f backup mode period reset bupmd z to recover from backup mode, steps c , d and e must be performed in this order. z if data is being written to the b ackup ram in the backup module, th e period (4) must be more than 50 clocks (1 sec (@54 mhz)) in orde r to guarantee the integrity of data. tmp19a64(rev1.1)- 17-3
tmp19a64c1d 17.4.2 power-on (recovery from backup mode) example: if the dvcc15 power and the bvcc power are activated with different timings dvcc3 (internal power supply) z t1: as bvcc stabilizes, breset is maintained at "l" for more than 2 ms*. (* this time length differs depending on the characteristics of the oscillator.) t2 dvcc15 (internal power supply) reset (main reset) bvcc (power supply for the backup module) breset (backup module reset) t1 t3 bupmd (backup mode signal) z t2: bupmd is set to "h" after a lapse of the warming-up time for the high-speed oscillator. z t3: reset is cleared after the level of bupm d changes to "h." (the backup module is initialized according to the initial routine.) even if the instruction to move to stop mode has been executed, low-speed oscillation continues as long as bvcc (power supply for the backup module) is supplying power. therefore, after the instruction to move to stop mode is executed, bvcc must be shut down. to recover from stop mode, first start bvcc, breset and bupmd in the same sequence as they are powered on, and then clear stop mode. tmp19a64(rev1.1)- 17-4
tmp19a64c1d 17.5 backup ram 17.5.1 features the backup module has a built-in backup ram (512 by tes) to be used when the tmp19a64 operates in low-power-consumption operation mode. this ram holds data when the tmp19a64 is operating in backup mode. the data held in the ram rema ins intact even if a reset is executed. z backup ram area (512 bytes): 0xffff_e800 through 0xffff_e9ff z data in the backup ram area is retained wh en the tmp19a64 is operating in backup mode. z the data held in the backup ram area is re tained even if a reset (/reset) is executed. z the /breset pin is used to initialize (undefined value) the backup ram area. note: concerning the access to the backup ram area for a read or write, a time length equal to 10 system clocks is required to process one such access. 17.6 clock timer 17.6.1 features the backup module has a built-in clock timer to be used when the tmp19a64 operates in low-power consumption operation mode. this clock timer using 32.768 khz as a low clock frequency can generate interrupts at time intervals of 0.125s, 0.250s, 0.500s and 1.000s so that the tmp19a64 is able to use the clock function when operating in low-power-consumption operation modes. this clock timer can be operated in all operation modes of low-frequency oscillation. the interrupt generated by the clock timer allows the tmp19a64 to recover from standby mode (except stop mode). to use the clock timer interrupt (intrtc), the imcgd re gister in the cg must be set to an appropriate setting. fig. 17.6.1 shows the block diagram of the clock timer. 15-stage binary counter selector 2 15 run& clear 2 14 2 13 2 12 fs (32.768 khz) 32-bit cumulative register rtcreg rtcflg rtccr breset clear interrupt request intrtc fig. 17.6.1 block diagra m of the clock timer tmp19a64(rev1.1)- 17-5
tmp19a64c1d 17.6.2 registers the clock timer is controlled by the clock timer cont rol register (rtccr), backup mode flag register (rtcflg), and clock timer count cumulative register (rtcreg). these registers are the 32-bit registers that can be initialized by /breset. fig. 17.6.2.1 shows the clock timer control register. (fs = 32.768 khz) 31 30 29 28 27 26 25 24 bit symbol read/write r after breset 0 0 0 0 0 0 0 0 function 23 22 21 20 19 18 17 16 bit symbol read/write r after breset 0 0 0 0 0 0 0 0 function 15 14 13 12 11 10 9 8 bit symbol read/write r after breset 0 0 0 0 0 0 0 0 function 7 6 5 4 3 2 1 0 bit symbol rtcrclr rtcsel1 rtcsel0 rtcrun read/write r/w r/w r w r/w r/w after breset 0 0 0 0 0 0 0 0 function write "0." write "0." clear cumulative register 0: clear 1: don?t care interrupt generation cycle 00: 2 15 /fs (1.000 s) 01: 2 14 /fs (0.500 s) 10: 2 13 /fs (0.250 s) 11: 2 12 /fs (0.125 s) binary counter 0: stop & clear 1: count rtccr (0xffff_e704) fig. 17.6.2.1 clock timer control register (note) to access this register, 32-bit access is required. (note) values read from the registers are undefined until /breset is activated. (note) values read from rtccr are always "1." (note) before changing the rtccr setting, make sure that rtccr is "0" and that the rtc interrupt is disabled. tmp19a64(rev1.1)- 17-6
tmp19a64c1d the backup mode flag register rtcflg is a 32-bit register that has the bit for monitoring the activation of /breset and can be initialized by / breset. by writing "1" to the bit after /breset when starting the backup module, this regist er can be used as a /breset activation monitor. fig. 17.6.2.2 shows the clock timer control register. 31 30 29 28 27 26 25 24 bit symbol read/write r after breset 0 0 0 0 0 0 0 0 function see note 23 22 21 20 19 18 17 16 bit symbol read/write r after breset 0 0 0 0 0 0 0 0 function see note 15 14 13 12 11 10 9 8 bit symbol read/write r after breset 0 0 0 0 0 0 0 0 function see note 7 6 5 4 3 2 1 0 bit symbol bupflg read/write r r/w after breset 0 0 0 0 0 0 0 0 function see note breset monitor flag 0: after breset see notes rtcflg (0xffff_e700) fig. 17.6.2.2 backup mode flag register (note) values read from this register ar e undefined until /breset is activated. (note) for this register, 32-bit access is required. (note) only "1" can be written to the bit. (note) after /breset, the bit changes to "0." therefore, this register can be used as a /breset activation monito r by writing "1" after /breset when starting the backup module. tmp19a64(rev1.1)- 17-7
tmp19a64c1d the clock timer is provided with a clock count cumulative register (rtcreg) for counting the number of times interrupts are generated. if 1.0s is selected as an interrupt genera tion cycle, a maximum of 4294967296 seconds can be retained (136 years, 70 days, 6 hours, 28 minutes, and 16 seconds). clock count cumulative register 31 30 29 28 27 26 25 24 bit symbol rui31 rui30 rui29 rui28 rui27 rui26 rui25 rui24 read/write r/w after reset 0 0 0 0 0 0 0 0 function accumulate count value 23 22 21 20 19 18 17 16 bit symbol rui23 rui22 rui21 rui20 rui19 rui18 rui17 rui16 read/write r/w after reset 0 0 0 0 0 0 0 0 function accumulate count value 15 14 13 12 11 10 9 8 bit symbol rui15 rui14 rui13 rui12 rui11 rui10 rui9 rui8 read/write r/w after reset 0 0 0 0 0 0 0 0 function accumulate count value 7 6 5 4 3 2 1 0 bit symbol rui7 rui6 rui5 rui4 rui3 rui2 rui1 rui0 read/write r/w after reset 0 0 0 0 0 0 0 0 function accumulate count value rtcreg (0xffff_e708) fig. 17.6.2.3 clock count cumulative register (note) values read from this register ar e undefined until /breset is activated. (note) to access this register, 32-bit access is required. (note) a write to this cumulative register clears the prescaler. (note) interrupts must be disabled during a read. tmp19a64(rev1.1)- 17-8
tmp19a64c1d example of the clock timer interrupt setting: initialization 7 6 5 4 3 2 1 0 imcd 0 0 1 0 0 0 0 0 disables the interrupt intrtc sets the bit <23:16> of a 32-bit register rtccr 0 0 0 0 x x x 0 stops the rtc timer count sets the bit <7:0> of a 32-bit register imcgd 0 0 1 1 0 0 0 1 sets the bit <15:8> of a 32-bit register eicrcg 0 0 0 0 1 1 0 1 clears the interrupt request for the cg block set the bit <7:0> of a 32-bit register intclr 0 1 1 1 1 0 0 0 clears the interrupt request for the intc block sets the bit <8:0> of a 32-bit register rtccr 0 0 0 0 1 x x 1 starts the timer count sets the bit <7:0> of a 32-bit register imcd 0 0 1 0 0 x x x sets the interrupt level set the bit <23:16> of a 32-bit register intrtc interrupt 7 6 5 4 3 2 1 0 eicrcg 0 0 0 0 1 1 0 1 clears the interrupt request for the cg block sets the bit <7:0> of a 32-bit register intclr 0 1 1 1 1 0 0 0 clears the interrupt request for the intc block sets the bit <8:0> of a 32-bit register processing interruption finished (note 1) x means "don't care." (note 2) to disable the interrupt generated in standby mode, imcd must be first set and then imcgd. tmp19a64(rev1.1)- 17-9
tmp19a64c1d 18. key-on wakeup 18.1 outline the tmp19a64 has 8 key inputs, key0 to key7, which can be used for releasing the stop/sleep mode or for external interrupts. note that interrupt processing is executed with one interrupt factor for the 8 inputs. each key input can be configured to be used or not, by programming (kwupstn). ? ? ? ? the active state of each input can be configured to the rising edge, the falling edge, the high level or the low level, by programming (kwupstn). an interrupt request is cleared by reading the key interrupt state register kwupst in the interrupt processing. the key input pins have pull-up functions, which can be enabled or disabled by programming the key pull-up control register kuppup. 18.2 key-on wakeup operation the tmp19a64 has 8 key input pins, key0 to key7. program the imcgc0 register in the cg to determine whether to use the key inputs for releas ing the stop/sleep mode or for normal interrupts. setting to "1" causes all the key inputs, key0 to key7, to be used for interrupts for releasing the stop/sleep mode. program kwupstn to enab le or disable interrupt inputs for each key input pin. also, program kwupstn to define the active state of each key input pin to be used. detection of key inputs is carried out in the kwup bl ock, and the detection results are notified to the imcgd register in the cg as the active high level. therefor e, program imcgd to "01" to determine the detection level to the high level. the results of detec tion in the cg are also notified to the interrupt controller intc as the active high level. theref ore, program the intc to "01" to define the corresponding interrupt as the high level. setting imcgd to 0 (default) configures all the input pins, key0 to key7 to the normal interrupts. in this case, you don?t have to make settings at the cg, but just specify the intc detection level to the high level. program kwupstn in the same way to enable or disable each key input and define their active states. reading kwupst during interrupt pro cessing clears the generated key interrupt requests. (note) if two or more key inputs are generated, the interrupt requests, which have been generated before the sequence of clearing the interrupt requests carried out in the interrupt processing routine that corresponds to the first key input, will be cleared at the same time. key interrupts are generated again for the interrupt requests that are generated after the said sequence of clearing the interrupt requests. 18.3 pull-up function each key input has the pull-up function. pull-up can be enabled for each bit of key inputs key0 to key7 by setting kuppup to "1." the pull-up function does not work for the key inputs that are disabled at kwupstn, independently of the kuppup setting. tmp19a64(rev1.1)- 18-1
tmp19a64c1d cautions on use of key inputs with pull-up enabled a) when you make the first setting after turning the power on 1) set kuppup ( ="1"). 2) set kwupstn to "1" for the keyn input to be used. 3) wait until the pull-up operation is completed. 4) set kwupstn to define the active state of the keyn input to be used. 5) clear interrupt requests by reading kwupst. 6) set cg and the intc. (refer to chapter 6, "interrupt settings" for the details of setting methods.) b) to change the active state of a key input during operation 1) disable key interrupts by setting imc3 to "000" at the intc. 2) change the active state by setting kwupstn for the keyn input to be changed. 3) clear interrupt requests by reading kwupst. 4) enable the key interrupt at the intc. (set imc3 to a desired level.) c) to enable a key input during operation 1) disable key interrupts by setting imc3 to "000" at the intc. 2) set kwupstn to "1" for the key input to be used. 3) wait until the pull-up operation is completed. 4) define the active state of the key input to be used at the corresponding kwupstn. 5) clear interrupt requests by reading kwupst. 6) enable key interrupts at the intc. (set imc3< ild2:d0> to a desired level.) cautions on use of key inputs with pull-up disabled a) when you make the first setting after turning the power on 1) set kuppup ( ="0") 2) set kwupstn to define the active state of the keyn input to be used. 3) clear interrupt requests by reading kwupst. 4) set kwupstn to "1" for the keyn input to be used. 5) set cg and the intc. (refer to chapter 6, "interrupt settings" for the details of setting methods.) b) to change the active state of a key input during operation 1) disable key interrupts by setting imc3 to "000" at the intc. 2) change the active state by setting kwupstn for the key input to be changed. 3) clear interrupt requests by reading kwupst. 4) enable key interrupts at the intc. (set imc3< ild2:d0> to a desired level.) c) to enable a key input during operation 1) disable key interrupts by setting imc3 to "000" at the intc. 2) define the active state by setting kwupstn for the key input to be used. 3) clear interrupt requests by reading kwupst. 4) set kwupstn to "1" for the key input to be used. 5) enable key interrupts at the intc. (set imc3 to a desired level.) tmp19a64(rev1.1)- 18-2
tmp19a64c1d key pull-up control register: kuppup 7 6 5 4 3 2 1 0 bit symbol keypup7 keypup6 keypup5 keypup4 keypup3 keypup2 keypup1 keypup0 read/write r/w after reset 0 0 0 0 0 0 0 0 function 0: pull-up disabled 1: pull-up enabled 0: pull-up disabled 1: pull-up enabled 0: pull-up disabled 1: pull-up enabled 0: pull-up disabled 1: pull-up enabled 0: pull-up disabled 1: pull-up enabled 0: pull-up disabled 1: pull-up enabled 0: pull-up disabled 1: pull-up enabled 0: pull-up disabled 1: pull-up enabled kuppup (0xffff_f371) 18.4 key input detection 1) pull-up disabled/enabled the active state of each keyn input can be defined to the high or low level or to the rising and/or falling edges by setting kwupstn. the act ive states of keyn i nputs are continuously detected. tmp19a64(rev1.1)- 18-3
tmp19a64c1d 7 6 5 4 3 2 1 0 kwupst0 bit symbol key01 key00 key0en (0xffff_f360) read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function define the key0 active state 00: "l" level 01: "h" level 10: falling edge 11: rising edge k e y 0 interrupt input 0: disable 1: enable 7 6 5 4 3 2 1 0 kwupst1 bit symbol key11 key10 key1en (0xffff_f361) read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function define the key1 active state 00: "l" level 01: "h" level 10: falling edge 11: rising edge k e y 1 interrupt input 0: disable 1: enable 7 6 5 4 3 2 1 0 kwupst2 bit symbol key21 key20 key2en (0xffff_f362) read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function define the key2 active state 00: "l" level 01: "h" level 10: falling edge 11: rising edge k e y 2 interrupt input 0: disable 1: enable 7 6 5 4 3 2 1 0 kwupst3 bit symbol key31 key30 key3en (0xffff_f363) read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function define the key3 active state 00: "l" level 01: "h" level 10: falling edge 11: rising edge k e y 3 interrupt input 0: disable 1: enable tmp19a64(rev1.1)- 18-4
tmp19a64c1d 7 6 5 4 3 2 1 0 kwupst4 bit symbol key41 key40 key4en (0xffff_f364) read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function define the key4 active state 00: "l" level 01: "h" level 10: falling edge 11: rising edge k e y 4 interrupt input 0: disable 1: enable 7 6 5 4 3 2 1 0 kwupst5 bit symbol key51 key50 key5en (0xffff_f365) read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function define the key5 active state 00: "l" level 01: "h" level 10: falling edge 11: rising edge k e y 5 interrupt input 0: disable 1: enable 7 6 5 4 3 2 1 0 kwupst6 bit symbol key61 key60 key6en (0xffff_f366) read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function define the key6 active state 00: "l" level 01: "h" level 10: falling edge 11: rising edge k e y 6 interrupt input 0: disable 1: enable 7 6 5 4 3 2 1 0 kwupst7 bit symbol key71 key70 key7en (0xffff_f367) read/write r r/w r r/w after reset 0 0 1 0 0 0 0 0 function define the key7 active state 00: "l" level 01: "h" level 10: falling edge 11: rising edge k e y 7 interrupt input 0: disable 1: enable tmp19a64(rev1.1)- 18-5
tmp19a64c1d 18.5 detection of key input inte rrupts and clearance of requests when keynen is set to 1 and an active signal is inpu t to keyn, the keyintn channel that corresponds to kwupst is set to "1," indicating that an interrupt is generated. the kwupst is the read-only register. reading this register clears the correspon ding bit that has been set to "1." if the active state is set to the high or low level, the co rresponding bit of the kwupst register remains "1" after it is read, unless the exte rnal input is withdrawn. key interrupt state register: kwupst 7 6 5 4 3 2 1 0 kwupst bit symbol keyint7 keyint6 keyin t5 keyint4 keyint3 keyint2 keyint1 keyint0 (0xffff_f370) read/write r after reset 0 0 0 0 0 0 0 0 function key7 interrupt state 0: no interrupt generated 1: interrupt generated key6 interrupt state 0: no interrupt generated 1: interrupt generated key5 interrupt state 0: no interrupt generated 1: interrupt generated key4 interrupt state 0: no interrupt generated 1: interrupt generated key3 interrupt state 0: no interrupt generated 1: interrupt generated key2 interrupt state 0: no interrupt generated 1: interrupt generated key1 interrupt state 0: no interrupt generated 1: interrupt generated key0 interrupt state 0: no interrupt generated 1: interrupt generated tmp19a64(rev1.1)- 18-6
tmp19a64c1d 19. rom correction function this chapter describes the rom correction function built into the tmp19a64. 19.1 features using this function, eight pieces of one-word data or four pieces of eight-word data can be replaced. ? ? ? if an address (lower 5 or 2 bits are "don't care" bits) written to the address register matches an address generated by the pc or dmac, rom data is replaced by data generated by the rom correction data register which is established in a ram area assigned to the above address register. rom correction is automatically authorized by writing an address to each address register. 19.2 description of operations by setting in the address register addregn a physical ad dress (including a projection area) of the rom area to be corrected, rom data can be replaced by data generated by a data register in a ram area assigned to addregn. the rom correction function is automatically en abled when an address is set in addregn, and it cannot be disabled. after a reset, the rom correction function is disabled. therefore, to execute rom correction with the initial setting after a reset is cleared, it is necessary to set an address in addreg. as an address is set in addreg, the rom corr ection function is enabled for this register. if the cpu has the bus right, rom data is replaced when the value generated by the pc matches that of the address register. if the dmac has the bus right, rom data is replaced when a source or destination address generated by the dmac matches the value of the address register. for example, if an address is set in addreg0 and addreg3, the rom correction function is enabled for this area; match detection is performed on these registers, and data replacement is executed if there is a match. data replacement is not execute d for addreg1, addreg2, and addreg4 through addreg7. although the bit <31:5> ex ists in address registers, match detection is performed on a<20:5>. internal pro cessing is that data replacement is executed by multiplying the romcs signal showing a rom area by the result of a match detectio n operation performed by rom correction circuitry. if eight-word data is replaced, an address for rom correction can be established only on an eight-word boundary, and data is replaced in units of 32 bytes. if on ly part of 32-byte data must be replaced with different data, the addresses that do not need to be replaced must be overwritten with the same data as the one existing prior to data replacement. tmp19a64(rev1.1)-19-1
tmp19a64c1d addregn registers and ram areas assigned to them are as follows: register address ram area number of words addreg0 0xffff_e540 0xfffd_ff60 - 0xfffd_ff7f 8 addreg1 0xffff_e544 0xfffd_ff80 - 0xfffd_ff9f 8 addreg2 0xffff_e548 0xfffd_ffa0 - 0xfffd_ffbf 8 addreg3 0xffff_e54c 0xfffd_ffc0 - 0xfffd_ffdf 8 addreg4 0xffff_e550 0xfffd_ffe0 - 0xfffd_ffe3 1 addreg5 0xffff_e554 0xfffd_ffe4 - 0xfffd_ffe7 1 addreg6 0xffff_e558 0xfffd_ffe8 - 0xfffd_ffeb 1 addreg7 0xffff_e55c 0xfffd_ffec - 0xfffd_ffef 1 addreg8 0xffff_e560 0xfffd_fff0 - 0xfffd_ffe3 1 addreg9 0xffff_e564 0xfffd_fff4 - 0xfffd_ffe7 1 addrega 0xffff_e568 0xfffd_fff8 - 0xfffd_ffeb 1 addregb 0xffff_e56c 0xfffd_fffc - 0xfffd_ffef 1 tmp19a64(rev1.1)-19-2
tmp19a64c1d address registe r addregn comparison circuit selector operand address instruction address rom selector operand data instruction data tx19a processor bus interface circuit write detection & hold circuit of addregn authorize comparison ram conver- sion circuit internal bus fig. 19.2.1 rom correction system diagram tmp19a64(rev1.1)-19-3
tmp19a64c1d 19.3 registers (1) address registers 7 6 5 4 3 2 1 0 addreg0 bit symbol add07 add06 add05 (0xffff_e540) read/write r/w r after reset 0 0 0 1 1 1 1 1 15 14 13 12 11 10 9 8 bit symbol add015 add014 add013 add012 add011 add010 add09 add08 read/write r/w after reset 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 bit symbol add023 add022 add021 add020 add019 add018 add017 add016 read/write r/w after reset 0 0 0 0 0 0 0 0 31 30 29 28 27 26 25 24 bit symbol add031 add030 add029 add028 add027 add026 add025 add024 read/write r/w after reset 0 0 0 0 0 0 0 0 7 6 5 4 3 2 1 0 addreg1 bit symbol add17 add16 add15 (0xffff_e544) read/write r/w r after reset 0 0 0 1 1 1 1 1 15 14 13 12 11 10 9 8 bit symbol add115 add114 add113 add112 add111 add110 add19 add18 read/write r/w after reset 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 bit symbol add123 add122 add121 add120 add119 add118 add117 add116 read/write r/w after reset 0 0 0 0 0 0 0 0 31 30 29 28 27 26 25 24 bit symbol add131 add130 add129 add128 add127 add126 add125 add124 read/write r/w after reset 0 0 0 0 0 0 0 0 7 6 5 4 3 2 1 0 addreg2 bit symbol add27 add26 add25 (0xffff_e548) read/write r/w r after reset 0 0 0 1 1 1 1 1 15 14 13 12 11 10 9 8 bit symbol add215 add214 add213 add212 add211 add210 add29 add28 read/write r/w after reset 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 bit symbol add223 add222 add221 add220 add219 add218 add217 add216 read/write r/w after reset 0 0 0 0 0 0 0 0 31 30 29 28 27 26 25 24 bit symbol add231 add230 add229 add228 add227 add226 add225 add224 read/write r/w after reset 0 0 0 0 0 0 0 0 tmp19a64(rev1.1)-19-4
tmp19a64c1d 7 6 5 4 3 2 1 0 addreg3 bit symbol add37 add36 add35 (0xffff_e54c) read/write r/w r after reset 0 0 0 1 1 1 1 1 15 14 13 12 11 10 9 8 bit symbol add315 add314 add313 add312 add311 add310 add39 add38 read/write r/w after reset 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 bit symbol add323 add322 add321 add320 add319 add318 add317 add316 read/write r/w after reset 0 0 0 0 0 0 0 0 31 30 29 28 27 26 25 24 bit symbol add331 add330 add329 add328 add327 add326 add325 add324 read/write r/w after reset 0 0 0 0 0 0 0 0 7 6 5 4 3 2 1 0 addreg4 bit symbol add47 add46 add45 add44 add43 add42 (0xffff_e550) read/write r/w r after reset 0 0 0 0 0 0 1 1 15 14 13 12 11 10 9 8 bit symbol add415 add414 add413 add412 add411 add410 add49 add48 read/write r/w after reset 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 bit symbol add423 add422 add421 add420 add419 add418 add417 add416 read/write r/w after reset 0 0 0 0 0 0 0 0 31 30 29 28 27 26 25 24 bit symbol add431 add430 add429 add428 add427 add426 add425 add424 read/write r/w after reset 0 0 0 0 0 0 0 0 7 6 5 4 3 2 1 0 addreg5 bit symbol add57 add56 add55 add54 add53 add52 (0xffff_e554) read/write r/w r after reset 0 0 0 0 0 0 1 1 15 14 13 12 11 10 9 8 bit symbol add515 add514 add513 add512 add511 add510 add59 add58 read/write r/w after reset 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 bit symbol add523 add522 add521 add520 add519 add518 add517 add516 read/write r/w after reset 0 0 0 0 0 0 0 0 31 30 29 28 27 26 25 24 bit symbol add531 add530 add529 add528 add527 add526 add525 add524 read/write r/w after reset 0 0 0 0 0 0 0 0 tmp19a64(rev1.1)-19-5
tmp19a64c1d 7 6 5 4 3 2 1 0 addreg6 bit symbol add67 add66 add65 add64 add63 add62 (0xffff_e558) read/write r/w r after reset 0 0 0 0 0 0 1 1 15 14 13 12 11 10 9 8 bit symbol add615 add614 add613 add612 add611 add610 add69 add68 read/write r/w after reset 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 bit symbol add623 add622 add621 add620 add619 add618 add617 add616 read/write r/w after reset 0 0 0 0 0 0 0 0 31 30 29 28 27 26 25 24 bit symbol add631 add630 add629 add628 add627 add626 add625 add624 read/write r/w after reset 0 0 0 0 0 0 0 0 7 6 5 4 3 2 1 0 addreg7 bit symbol add77 add76 add75 add74 add73 add72 (0xffff_e55c) read/write r/w r after reset 0 0 0 0 0 0 1 1 15 14 13 12 11 10 9 8 bit symbol add715 add714 add713 add712 add711 add710 add79 add78 read/write r/w after reset 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 bit symbol add723 add722 add721 add720 add719 add718 add717 add716 read/write r/w after reset 0 0 0 0 0 0 0 0 31 30 29 28 27 26 25 24 bit symbol add731 add730 add729 add728 add727 add726 add725 add724 read/write r/w after reset 0 0 0 0 0 0 0 0 7 6 5 4 3 2 1 0 addreg8 bit symbol add87 add86 add85 add84 add83 add82 (0xffff_e560) read/write r/w r after reset 0 0 0 0 0 0 1 1 15 14 13 12 11 10 9 8 bit symbol add815 add814 add813 add812 add811 add810 add89 add88 read/write r/w after reset 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 bit symbol add823 add822 add821 add820 add819 add818 add817 add816 read/write r/w after reset 0 0 0 0 0 0 0 0 31 30 29 28 27 26 25 24 bit symbol add831 add830 add829 add828 add827 add826 add825 add824 read/write r/w after reset 0 0 0 0 0 0 0 0 tmp19a64(rev1.1)-19-6
tmp19a64c1d 7 6 5 4 3 2 1 0 addreg9 bit symbol add97 add96 add95 add94 add93 add92 (0xffff_e564) read/write r/w r after reset 0 0 0 0 0 0 1 1 15 14 13 12 11 10 9 8 bit symbol add915 add914 add913 add912 add911 add910 add99 add98 read/write r/w after reset 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 bit symbol add923 add922 add921 add920 add919 add918 add917 add916 read/write r/w after reset 0 0 0 0 0 0 0 0 31 30 29 28 27 26 25 24 bit symbol add931 add930 add929 add928 add927 add926 add925 add924 read/write r/w after reset 0 0 0 0 0 0 0 0 7 6 5 4 3 2 1 0 addrega bit symbol adda7 adda6 adda5 adda4 adda3 adda2 (0xffff_e568) read/write r/w r after reset 0 0 0 0 0 0 1 1 15 14 13 12 11 10 9 8 bit symbol adda15 adda14 adda13 adda12 adda11 adda10 adda9 adda8 read/write r/w after reset 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 bit symbol adda23 adda22 adda21 adda20 adda19 adda18 adda17 adda16 read/write r/w after reset 0 0 0 0 0 0 0 0 31 30 29 28 27 26 25 24 bit symbol adda31 adda30 adda29 adda28 adda27 adda26 adda25 adda24 read/write r/w after reset 0 0 0 0 0 0 0 0 7 6 5 4 3 2 1 0 addregb bit symbol addb7 addb6 addb5 addb4 addb3 addb2 (0xffff_e56c) read/write r/w r after reset 0 0 0 0 0 0 1 1 15 14 13 12 11 10 9 8 bit symbol addb15 addb14 addb13 addb12 addb11 addb10 addb9 addb8 read/write r/w after reset 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 bit symbol addb23 addb22 addb21 addb20 addb19 addb18 addb17 addb16 read/write r/w after reset 0 0 0 0 0 0 0 0 31 30 29 28 27 26 25 24 bit symbol addb31 addb30 addb29 addb28 addb27 addb26 addb25 addb24 read/write r/w after reset 0 0 0 0 0 0 0 0 tmp19a64(rev1.1)-19-7
tmp19a64c1d (note 1) data cannot be transferred by dma to the address register. however, data can be transferred by dma to the ram area where data for replacement is placed. the rom correction function supports data replacement for both cpu and dma access. (note 2) writing back the initial value "0x00" allows data at the reset address to be replaced. tmp19a64(rev1.1)-19-8
tmp19a64c1d tmp19a64 (rev1.1) -20-1 20. security function 20.1 general this device is implemented with the rom security functi on for the internal rom (fl ash) area as well as the dsu security function to inhibit use of dsu (dsu-probes). the following three security functions are available: ? flash security ? rom security ? dsu security 20.2 features 20.2.1 flash security the flash security function refers to the condition wh ere all the memory areas are protected through the automatic protection bit programming function to use the flcs b its inhibiting write and erase operations of the internal rom data for individual protection areas (in 512 kb blocks). in this case, the flash memory cannot be read fr om any area outside the flash memory such as the internal ram areas where the protection bit erase command cannot be accepted. after this, no command writing can be performed normally. the flash security function is al so a function to be necessary in enabling the rom security and dsu security functions. when the automatic protection bit erase command is execut ed while the system is in a secure condition, the flash memory is automatically initialized within the de vice. therefore, be sufficiently careful in making a transition to a secure state. 20.2.2 rom security the rom security function can inhibit data write/read operations to/from the internal rom. this function is used together with the flash security function. although the pc of ram ar ea instructions that have been repl aced from the rom ar ea through the rom correction function indicates an address in the flash rom area, it is actually in the ram area and thus data cannot be read in the condition rom s ecurity is in place. for reading data using an instruction in the ram area that has been replaced from the rom area, some sp ecial method such as to use a program in the rom area to write the data value into ram will be necessary. when the rom security is applied to the rom area, the following operations are inhibited: ? operation to load or store rom area data us ing an instruction placed outside the rom area ? dmac data transfer of rom area data ? ejtag based operation to load or store rom area data ? boot rom operation to load or store rom area data ? flash writer operation to load or store rom area data ? access to security related registers (romse c1 and romsec2) in the rom area using an instruction placed outside the rom area. ? execution of any flash command sequence other than the automatic block protection clear command and automatic block security clear comm and in the writer mode and any flash command sequence in the single mode or boot mode that specifies an address in the rom area
tmp19a64c1d tmp19a64 (rev1.1) -20-2 even when the rom security is applied to the rom area, the following operations can be performed: ? loading of rom area data using an instruction placed in the rom area ? loading of data outside the rom area to use an instruction placed in any area ? branch instruction to jump to the rom area to use an instruction placed in any area ? pc trace (with some limitations) and break operations in the rom area to use ejtag 20.2.3 dsu security the dsu security function prevents eas y reading of the internal flash memory by a third party other than the authorized user when an onb oard dsu probe is used. by enabling the dsu security function, it becomes impossible to read the internal flash memory from a dsu probe. this function is used together with the flash security function.
tmp19a64c1d 20.3 outline security configur ation and correspondence table chip 0 chip 1 protection bits flcs if "1111," romsec1 rom security flash security dsusec1 dsu security cs_dmac generation of bus error exception 19a64f20a when dmac register is written from outside internal rom fig. 21.3.1 various security conditions (outline) table 21.3.1 various security conditions in each mode protection bit setting, flcs 1111 1111 rom security enable bit, romsec1 1 0 don?t care dsu security enable bit, dsus ec1 1 0 1 0 don?t care flash security state on off rom security state on off off dsu security state on off on off off flash read from the internal rom { { { { { flash read from outside the internal rom *1 *1 { { { rom security enable clear (from rom) { { { rom security enable clear (from outside rom) *2 *2 { dsu security enable clear (from rom) { { { dsu security enable clear (from outside rom) *3 { { generation of protection bit erase command *4 *4 { *8 { *8 { generation of command other than protection bit erase command *5 *5 *7 *7 *9 write to dmac configuration register (from rom) { { { { { single/single boot mode write to dmac configuration register (from outside rom) *6 *6 { { { flash read *1 *1 *1 *1 { generation of protection bit erase command { *8 { *8 { *8 { *8 *9 writer mode generation of command other than protection bit erase command *7 *7 *7 *7 *9 *1 : always reads "0x00000098." *2 : masks the stored data (registe r cannot be written or cleared.) *3 : masks the stored data (registe r cannot be written or cleared.) *4 : command address is masked and the fl ash memory cannot recognize the command. *5 : command address is masked and the fl ash memory cannot recognize the command. *6 : bus error exceptions are generate d. (when set to dmac register.) *7 : commands are not recognized because of the flash security state. *8 : commands result in flash area erase and protection bit erase operations because of the flash security state. *9 : command conversion is performed in the flash interface ac cording to the protection bit status and input command. tmp19a64 (rev1.1) -20-3
tmp19a64c1d tmp19a64 (rev1.1) -20-4 20.4 register flash control/ status register this resister is used to monitor the status of the flash memory and to indicate the block protection status. table 21.3.2 flash control register 7 6 5 4 3 2 1 0 flcs bit symbol protect3 protect2 protect1 protect0 romtype prgb rdy/bsy (0xffff_e520) read/write r r r r/w r after power on reset 0 0 0 0 0 0 0 1 function protection area setting (in 512 kb blocks) 0000: no blocks are protected xxx1: area 0 is protected xx1x: area 1 is protected x1xx: area 2 is protected 1xxx: area 3 is protected rom id bit 0: flash 1: mrom programming bit 0: already issued 1: issue ready/busy 0: in operation 1: finished operation 15 14 13 12 11 10 9 8 bit symbol read/write r after power on reset 0 0 0 0 0 0 0 0 function 23 22 21 20 19 18 17 16 bit symbol read/write r after power on reset 0 0 0 0 0 0 0 0 function 31 30 29 28 27 26 25 24 bit symbol read/write r after power on reset 0 0 0 0 0 0 0 0 function bit 0: ready/busy flag bit the rdy/bsy output is provided as a means to monitor the status of automatic operation. this bit is a function bit for the cpu to monitor the function. when th e flash memory is in automatic operation, it outputs "0" to indicate that it is busy. when the automatic operation is terminated, it returns to the ready state and outputs "1" to accept the next command. if the automatic operation has failed, this bit maintains the "0" output. it returns to "1" upon power on. (note) be sure to confirm the ready status whenever a command is to be issued. issuing a command while the device is busy may result in a situation where any further command inputs are rejected in addition to the fact that the command cannot be transferred correctly. in such a case, restore the system by using system reset or a reset command. bit 1: programming bit this bit notifies the flash interface that a co mmand is to be issued to the flash memory. be sure to set this bit to "1" whenever a command is to be issued to the internal flash memory. also, when all commands have been issued, set this bit to "0" after c onfirming that the bit has been set to "1." bit 2: rom type identification bit this bit is read after reset to identify wh ether the rom is a flash rom or a mask rom. flash rom: "0" mask rom: "1" bits [7:4]: protection bits (x: can be set to any combination of areas) each of the protection bits (4 bits) represents the protection status of th e corresponding area. when a bit is set to "1," it indicates th at the area corresponding to the bit is protecte d. when the area is protected, data cannot be written into it.
tmp19a64c1d tmp19a64 (rev1.1) -20-5 table 21.3.3 rom security register 7 6 5 4 3 2 1 0 romsec1 bit symbol rsecon (0xffff_e518) read/write r r/w after power on reset 0 1 function always reads "0." rom rom security 1: on 0: off (note) 15 14 13 12 11 10 9 8 bit symbol read/write r after power on reset 0 function always reads "0." 23 22 21 20 19 18 17 16 bit symbol read/write r after power on reset 0 function 31 30 29 28 27 26 25 24 bit symbol read/write r after power on reset 0 function always reads "0." (note) this register can be initialized only by a power on reset. normal reset inputs cannot reset the register. (note) this register must be 32-bit accessed.
tmp19a64c1d tmp19a64 (rev1.1) -20-6 table 21.3.4 security lock register 7 6 5 4 3 2 1 0 romsec2 bit symbol (0xffff_e51c) read/write w after reset undefined function refer to the note. 15 14 13 12 11 10 9 8 b i t s y m b o l read/write w after reset undefined function refer to the note. 23 22 21 20 19 18 17 16 b i t s y m b o l read/write w after reset undefined function refer to the note. 31 30 29 28 27 26 25 24 b i t s y m b o l read/write w after reset undefined function refer to the note. (note) after setting romsec1 , setting "0x0000_003d" to this register sets the value to romsec1 . (note) when rom security is applied to a rom area, the romsec1 and romsec2 registers can be accessed only from an instruction placed in the rom area. (note) this register must be 32-bit accessed. (note) this register is a write-only register. any value read is undefined.
tmp19a64c1d tmp19a64 (rev1.1) -20-7 table 21.3.5 dsu security mode register 7 6 5 4 3 2 1 0 dsusec1 bit symbol dsuoff (0xffff_e510) read/write r r/w after power on reset 0 1 function always reads "0." 1: dsu disable 0: dsu enable 15 14 13 12 11 10 9 8 bit symbol read/write r after power on reset 0 function always reads "0." 23 22 21 20 19 18 17 16 bit symbol read/write r after power on reset 0 function 31 30 29 28 27 26 25 24 bit symbol read/write r after power on reset 0 function always reads "0." (note) this register can be initialized only by a power on reset. normal reset inputs cannot reset the register. (note) this register must be 32-bit accessed. table 21.3.6 dsu security control register 7 6 5 4 3 2 1 0 dsusec2 bit symbol dsecode07 dsecode06 dsecode05 dsecode04 dsecode03 dsecode02 dsecode01 dsecode00 (0xffff_e514) read/write w after reset 0 function write "0x0000_00c5." 15 14 13 12 11 10 9 8 bit symbol dsecode15 dsecode14 dsecode13 dsecode12 dsecode11 dsecode10 dsecode09 dsecode08 read/write w after reset 0 function write "0x0000_00c5." 23 22 21 20 19 18 17 16 bit symbol dsecode23 dsecode22 dsecode21 dsecode20 dsecode19 dsecode18 dsecode17 dsecode16 read/write w after reset 0 function write "0x0000_00c5." 31 30 29 28 27 26 25 24 bit symbol dsecode31 dsecode30 dsecode29 dsecode28 dsecode27 dsecode26 dsecode25 dsecode24 read/write w after reset 0 function write "0x0000_00c5." (note) this register must be 32-bit accessed. (note) this register is a write-only register. any value read is undefined.
tmp19a64c1d tmp19a64 (rev1.1) -20-8 20.5 setting security configuration if it is necessary to rewrite the flash memory or protectio n bits while the device is in a secure state, either perform the automatic protection bit erase operation or clear the rom security function. while the dsu security is applied, any dsu cannot be used. the setting is necessary to make dsu- probe available beforehand if an automatic protection bit programming is executed to result in a flash security state. when the automatic protection bit erase command is executed while the system is in the flash security mode, the flash memory is automatically initialized within the devi ce. therefore, be sufficiently careful in making a transition to a secure state. 20.5.1 flash security setting or clearing of flash security is made using a command sequence to the flash memory to use the protection bit programming command. refer to command sequence descriptions in the section describing flash memory operation for more details. 20.5.2 rom security in order to prevent the rom security function from being accidentally removed by system runaway, etc., a double action method is used to set or clear the rom security function. to make rom security functional, first set the rom security register romsec1 to "1" and then write the security code "0x0000_003d" to the rom security lock register ro msec2. similarly, when the rom security function is to be cleared, first set the rom security regi ster romsec1 to "0" and then write the security code "0x0000_003d" to the ro m security lock register romsec2. (note) the rom security register has a power on reset circuit and the bit is set to "1" after power is turned on. if the flash security function is in place at this point, the rom security function is automatically enabled to inhibit data write/read operations to/from the internal rom. 20.5.3 dsu security dsu enable/disable (enables or disables use of dsu probes for debugging) in order to prevent the dsu inhibit function from being accidentally removed by system runaway, etc., a double action method is used to clear the dsu inhibit function. so, first set the dsu security mode register dsusec1 to "0" and then write the security code "0x0000_00c5" to the dsu security control register dsusec2. then, debugging to use a dsu probe is allowed. while power to the device is still applied, setting dsusec1 to "1" and wr iting "0x0000_00c5" to the dsusec2 register will enable the security function again. (note) the dsu security mode register has a power on reset circuit and the bit is set to "1" after power is turned on. if the flash security function is in place at this point, the dsu security function is automatically enabled and it becomes impossible to read the internal flash memory from any dsu probe.
tmp19a64c1d 20.5.4 rom security regi ster: romsec1 the rom security register is provided with a power on re set circuit. note that the data to be read from the romsec1 bit is different from the original data written to the register. the outline schematic diagram is shown below: tmp19a64 (rev1.1) -20-9 20.5.5 dsu security mode register: dsusec1 the dsu security mode register is pr ovided with a power on reset circuit. note that the data to be read from the dsusec1 bit is different from the original data written to the register. the outline schematic diagram is shown below: dsusec1 write dsusec1 write data clk reset power on reset dsu security flash security dsusec1 read data dsusec2 = 0x0000_00c5 in the rom security state, any access from outside the internal rom is inhibited. d q sd dq sd romsec1 write romsec1 write data clk reset power on reset rom security flash security romsec1 read data dq dq sd sd romsec2 = 0x0000_003d in the rom security state, any access from outside the rom is inhibited.
tmp19a64c1d tmp19a64 (rev1.1) -21-1 21. table of special function registers special function registers are a llocated to an 8k-byte address space from ffffe000h to ffffffffh. [1] port registers [2] watchdog timer [3] 16-bit timer [4] i 2 cbus/serial channel [5] uart/serial channel [6] 10-bit a/d converter [7] key-on wake-up [8] 32-bit input capture [9] 32-bit compare [10] interrupt controller [11] dma controller [12] chip select/wait controller [13] access control [14] security control [15] flash control [16] rom correction [17] clock timer [18] clock generator (note) 0xffff_f000 to 0xffff _ffff are a little-endian area. 0xffff_e000 to 0xffff_efff are a bi-endian area. (note) for continuous 8-b it long registers, 16- or 32-bit access is possible. the use of 16- or 32-bit access requires that an even-number address be accessed and that an even-number address does not contain undefined areas.
tmp19a64c1d tmp19a64 (rev1.1) -21-2 little-endian [1] port registers adr register name adr register name adr register name fffff000h p0 fffff010h fffff020h p4cr 1h p1 1h 1h p4fc 2h p0cr 2h p2 2h 3h 3h 3h 4h p1cr 4h p2cr 4h 5h p1fc 5h p2fc 5h 6h 6h 6h 7h 7h 7h 8h 8h p3 8h p5 9h 9h 9h p6 ah ah p3cr ah bh bh p3fc bh ch ch ch p5cr dh dh dh p5fc eh eh p4 eh p6cr fh fh fh p6fc adr register name adr register name adr register name adr register name fffff040h p7 fffff050h pb fffff060h pf fffff070h pj 1h p8 1h pc 1h pg 1h pk 2h p9 2h pd 2h ph 2h 3h pa 3h pe 3h pi 3h 4h 4h pbcr 4h pfcr 4h pjcr 5h 5h pccr 5h pgcr 5h pkcr 6h 6h pdcr 6h phcr 6h 7h pacr 7h pecr 7h picr 7h 8h p7fc 8h pbfc 8h pffc 8h pjfc 9h p8fc 9h pcfc 9h pgfc 9h pkfc ah p9fc ah pdfc ah phfc ah bh pafc bh pefc bh pifc bh ch ch ch pfode ch dh dh pcode dh dh eh eh pdode eh eh fh fh peode fh fh adr register name adr register name fffff0c0h pl fffff0d0h pp 1h pm 1h pq 2h pn 2h 3h po 3h 4h plcr 4h ppcr 5h pmcr 5h pqcr 6h pncr 6h 7h pocr 7h 8h 8h ppfc 9h 9h ah ah bh pofc bh ch ch ppfc2 dh dh pqfc2 eh eh fh poode fh
tmp19a64c1d tmp19a64 (rev1.1) -21-3 little-endian [2] wdt adr register name fffff090h wdmod 1h wdcr 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh [3] 16-bit timer adr register name adr register name adr register name adr register name fffff140h tb0run fffff150h tb1run fffff160h tb2run fffff170h tb3run 1h tb0cr 1h tb1cr 1h tb2cr 1h tb3cr 2h tb0mod 2h tb1mod 2h tb2mod 2h tb3mod 3h tb0ffcr 3h tb1ffcr 3h tb2ffcr 3h tb3ffcr 4h tb0st 4h tb1st 4h tb2st 4h tb3st 5h 5h 5h 5h 6h tb0ucl 6h tb1ucl 6h tb2ucl 6h tb3ucl 7h tb0uch 7h tb1uch 7h tb2uch 7h tb3uch 8h tb0rg0l 8h tb1rg0l 8h tb2rg0l 8h tb3rg0l 9h tb0rg0h 9h tb1rg0h 9h tb2rg0h 9h tb3rg0h ah tb0rg1l ah tb1rg1l ah tb2rg1l ah tb3rg1l bh tb0rg1h bh tb1rg1h bh tb2rg1h bh tb3rg1h ch tb0cp0l ch tb1cp0l ch tb2cp0l ch tb3cp0l dh tb0cp0h dh tb1cp0h dh tb2cp0h dh tb3cp0h eh tb0cp1l eh tb1cp1l eh tb2cp1l eh tb3cp1l fh tb0cp1h fh tb1cp1h fh tb2cp1h fh tb3cp1h adr register name adr register name adr register name adr register name fffff180h tb4run fffff190h tb5run fffff1a0h tb6run fffff1b0h tb7run 1h tb4cr 1h tb5cr 1h tb6cr 1h tb7cr 2h tb4mod 2h tb5mod 2h tb6mod 2h tb7mod 3h tb4ffcr 3h tb5ffcr 3h tb6ffcr 3h tb7ffcr 4h tb4st 4h tb5st 4h tb6st 4h tb7st 5h 5h 5h 5h 6h tb4ucl 6h tb5ucl 6h tb6ucl 6h tb7ucl 7h tb4uch 7h tb5uch 7h tb6uch 7h tb7uch 8h tb4rg0l 8h tb5rg0l 8h tb6rg0l 8h tb7rg0l 9h tb4rg0h 9h tb5rg0h 9h tb6rg0h 9h tb7rg0h ah tb4rg1l ah tb5rg1l ah tb6rg1l ah tb7rg1l bh tb4rg1h bh tb5rg1h bh tb6rg1h bh tb7rg1h ch tb4cp0l ch tb5cp0l ch tb6cp0l ch tb7cp0l dh tb4cp0h dh tb5cp0h dh tb6cp0h dh tb7cp0h eh tb4cp1l eh tb5cp1l eh tb6cp1l eh tb7cp1l fh tb4cp1h fh tb5cp1h fh tb6cp1h fh tb7cp1h
tmp19a64c1d tmp19a64 (rev1.1) -21-4 little-endian adr register name adr register name adr register name fffff1c0h tb8run fffff1d0h tb9run fffff1e0h tbarun 1h tb8cr 1h tb9cr 1h tbacr 2h tb8mod 2h tb9mod 2h tbamod 3h tb8ffcr 3h tb9ffcr 3h tbaffcr 4h tb8st 4h tb9st 4h tbast 5h 5h 5h 6h tb8ucl 6h tb9ucl 6h tbaucl 7h tb8uch 7h tb9uch 7h tbauch 8h tb8rg0l 8h tb9rg0l 8h tbarg0l 9h tb8rg0h 9h tb9rg0h 9h tbarg0h ah tb8rg1l ah tb9rg1l ah tbarg1l bh tb8rg1h bh tb9rg1h bh tbarg1h ch tb8cp0l ch tb9cp0l ch tbacp0l dh tb8cp0h dh tb9cp0h dh tbacp0h eh tb8cp1l eh tb9cp1l eh tbacp1l fh tb8cp1h fh tb9cp1h fh tbacp1h [4] i2c/sio [5] uart/sio adr register name adr register name adr register name adr register name fffff250h sbicr1 fffff260h sc0buf fffff270h sc1buf fffff280h sc2buf 1h sbidbr 1h sc0cr 1h sc1cr 1h sc2cr 2h i2car 2h sc0mod0 2h sc1mod0 2h sc2mod0 3h sbicr2/sr 3h br0cr 3h br1cr 3h br2cr 4h sbibr0 4h br0add 4h br1add 4h br2add 5h 5h sc0mod1 5h sc1mod1 5h sc2mod1 6h 6h sc0mod2 6h sc1mod2 6h sc2mod2 7h sbicr0 7h sc0en 7h sc1en 7h sc2en 8h 8h sc0rfc 8h sc1rfc 8h sc2rfc 9h 9h sc0tfc 9h sc1tfc 9h sc2tfc ah ah sc0rst ah sc1rst ah sc2rst bh bh sc0tst bh sc1tst bh sc2tst ch ch sc0fcnf ch sc1fcnf ch sc2fcnf dh dh dh dh eh eh eh eh fh fh fh fh adr register name adr register name adr register name adr register name fffff290h sc3buf fffff2a0h sc4buf fffff2b0h sc5buf fffff2c0h sc6buf 1h sc3cr 1h sc4cr 1h sc5cr 1h sc6cr 2h sc3mod0 2h sc4mod0 2h sc5mod0 2h sc6mod0 3h br3cr 3h br4cr 3h br5cr 3h br6cr 4h br3add 4h br4add 4h br5add 4h br6add 5h sc3mod1 5h sc4mod1 5h sc5mod1 5h sc6mod1 6h sc3mod2 6h sc4mod2 6h sc5mod2 6h sc6mod2 7h sc3en 7h sc4en 7h sc5en 7h sc6en 8h sc3rfc 8h sc4rfc 8h sc5rfc 8h sc6rfc 9h sc3tfc 9h sc4tfc 9h sc5tfc 9h sc6tfc ah sc3rst ah sc4rst ah sc5rst ah sc6rst bh sc3tst bh sc4tst bh sc5tst bh sc6tst ch sc3fcnf ch sc4fcnf ch sc5fcnf ch sc6fcnf dh dh dh dh eh eh eh eh fh fh fh fh
tmp19a64c1d tmp19a64 (rev1.1) -21-5 little-endian [6] 10-bit adc [7] kwup adr register name adr register name adr register name adr register name fffff300h adreg08l fffff310h adregspl fffff360h kwupst0 fffff370h kwupst 1h adreg08h 1h adregsph 1h kwupst1 1h kuppup 2h adreg19l 2h adcomregl 2h kwupst2 2h 3h adreg19h 3h adcomregh 3h kwupst3 3h 4h adreg2al 4h admod0 4h kwupst4 4h 5h adreg2ah 5h admod1 5h kwupst5 5h 6h adreg3bl 6h admod2 6h kwupst6 6h 7h adreg3bh 7h admod3 7h kwupst7 7h 8h adreg4cl 8h admod4 8h 8h 9h adreg4ch 9h 9h 9h ah adreg5dl ah ah ah bh adreg5dh bh bh bh ch adreg6el ch adclk ch ch dh adreg6eh dh dh dh eh adreg7fl eh eh eh fh adreg7fh fh fh fh [8] 32-bit input capture adr register name adr register name adr register name fffff400h tccr fffff410h cap0cr fffff420h cap2cr 1h tbtrun 1h 1h 2h tbtcr 2h 2h 3h 3h 3h 4h tbtcap0 4h tccap0ll 4h tccap2ll 5h tbtcap1 5h tccap0lh 5h tccap2lh 6h tbtcap2 6h tccap0hl 6h tccap2hl 7h tbtcap3 7h tccap0hh 7h tccap2hh 8h tbtrdcap0 8h cap1cr 8h cap3cr 9h tbtrdcap1 9h 9h ah tbtrdcap2 ah ah bh tbtrdcap3 bh bh ch tcgim ch tccap1ll ch tccap3ll dh tcgst dh tccap1lh dh tccap3lh eh eh tccap1hl eh tccap3hl fh fh tccap1hh fh tccap3hh [9] 32-bit output compare adr register name adr register name adr register name adr register name fffff440h tccmp0ll fffff450h tccmp4ll fffff460h tccmp8ll fffff470h cmpctl0 1h tccmp0lh 1h tccmp4lh 1h tccmp8lh 1h cmpctl1 2h tccmp0hl 2h tccmp4hl 2h tccmp8hl 2h cmpctl2 3h tccmp0hh 3h tccmp4hh 3h tccmp8hh 3h cmpctl3 4h tccmp1ll 4h tccmp5ll 4h tccmp9ll 4h cmpctl4 5h tccmp1lh 5h tccmp5lh 5h tccmp9lh 5h cmpctl5 6h tccmp1hl 6h tccmp5hl 6h tccmp9hl 6h cmpctl6 7h tccmp1hh 7h tccmp5hh 7h tccmp9hh 7h cmpctl7 8h tccmp2ll 8h tccmp6ll 8h 8h cmpctl8 9h tccmp2lh 9h tccmp6lh 9h 9h cmpctl9 ah tccmp2hl ah tccmp6hl ah ah bh tccmp2hh bh tccmp6hh bh bh ch tccmp3ll ch tccmp7ll ch ch dh tccmp3lh dh tccmp7lh dh dh eh tccmp3hl eh tccmp7hl eh eh fh tccmp3hh fh tccmp7hh fh fh
tmp19a64c1d tmp19a64 (rev1.1) -21-6 little-endian [10] intc adr register name adr register name adr register name adr register name ffffe000h imc0 ffffe010h imc4 ffffe020h imc8 ffffe030h imcc 1h ditto 1h ditto 1h ditto 1h ditto 2h ditto 2h ditto 2h ditto 2h ditto 3h ditto 3h ditto 3h ditto 3h ditto 4h imc1 4h imc5 4h imc9 4h imcd 5h ditto 5h ditto 5h ditto 5h ditto 6h ditto 6h ditto 6h ditto 6h ditto 7h ditto 7h ditto 7h ditto 7h ditto 8h imc2 8h imc6 8h imca 8h imce 9h ditto 9h ditto 9h ditto 9h ditto ah ditto ah ditto ah ditto ah ditto bh ditto bh ditto bh ditto bh ditto ch imc3 ch imc7 ch imcb ch imcf dh ditto dh ditto dh ditto dh ditto eh ditto eh ditto eh ditto eh ditto fh ditto fh ditto fh ditto fh ditto adr register name adr register name adr register name ffffe040h ivr ffffe060h intclr ffffe100h 1h ditto 1h ditto 1h 2h ditto 2h ditto 2h 3h ditto 3h ditto 3h 4h 4h 4h 5h 5h 5h 6h 6h 6h 7h 7h 7h 8h 8h 8h 9h 9h 9h ah ah ah bh bh bh ch ch ch ilev dh dh dh ditto eh eh eh ditto fh fh fh ditto
tmp19a64c1d tmp19a64 (rev1.1) -21-7 little-endian [11] dmac adr register name adr register name adr register name adr register name ffffe200h ccr0 ffffe210h bcr0 ffffe220h ccr1 ffffe230h bcr1 1h ditto 1h ditto 1h ditto 1h ditto 2h ditto 2h ditto 2h ditto 2h ditto 3h ditto 3h ditto 3h ditto 3h ditto 4h csr0 4h 4h csr1 4h 5h ditto 5h 5h ditto 5h 6h ditto 6h 6h ditto 6h 7h ditto 7h 7h ditto 7h 8h sar0 8h dtcr0 8h sar1 8h dtcr1 9h ditto 9h ditto 9h ditto 9h ditto ah ditto ah ditto ah ditto ah ditto bh ditto bh ditto bh ditto bh ditto ch dar0 ch ch dar1 ch dh ditto dh dh ditto dh eh ditto eh eh ditto eh fh ditto fh fh ditto fh adr register name adr register name adr register name adr register name ffffe240h ccr2 ffffe250h bcr2 ffffe260h ccr3 ffffe270h bcr3 1h ditto 1h ditto 1h ditto 1h ditto 2h ditto 2h ditto 2h ditto 2h ditto 3h ditto 3h ditto 3h ditto 3h ditto 4h csr2 4h 4h csr3 4h 5h ditto 5h 5h ditto 5h 6h ditto 6h 6h ditto 6h 7h ditto 7h 7h ditto 7h 8h sar2 8h dtcr2 8h sar3 8h dtcr3 9h ditto 9h ditto 9h ditto 9h ditto ah ditto ah ditto ah ditto ah ditto bh ditto bh ditto bh ditto bh ditto ch dar2 ch ch dar3 ch dh ditto dh dh ditto dh eh ditto eh eh ditto eh fh ditto fh fh ditto fh adr register name adr register name adr register name adr register name ffffe280h ccr4 ffffe290h bcr4 ffffe2a0h ccr5 ffffe2b0h bcr5 1h ditto 1h ditto 1h ditto 1h ditto 2h ditto 2h ditto 2h ditto 2h ditto 3h ditto 3h ditto 3h ditto 3h ditto 4h csr4 4h 4h csr5 4h 5h ditto 5h 5h ditto 5h 6h ditto 6h 6h ditto 6h 7h ditto 7h 7h ditto 7h 8h sar4 8h dtcr4 8h sar5 8h dtcr5 9h ditto 9h ditto 9h ditto 9h ditto ah ditto ah ditto ah ditto ah ditto bh ditto bh ditto bh ditto bh ditto ch dar4 ch ch dar5 ch dh ditto dh dh ditto dh eh ditto eh eh ditto eh fh ditto fh fh ditto fh
tmp19a64c1d tmp19a64 (rev1.1) -21-8 little-endian adr register name adr register name adr register name adr register name ffffe2c0h ccr6 ffffe2d0h bcr6 ffffe2e0h ccr7 ffffe2f0h bcr7 1h ditto 1h ditto 1h ditto 1h ditto 2h ditto 2h ditto 2h ditto 2h ditto 3h ditto 3h ditto 3h ditto 3h ditto 4h csr6 4h 4h csr7 4h 5h ditto 5h 5h ditto 5h 6h ditto 6h 6h ditto 6h 7h ditto 7h 7h ditto 7h 8h sar6 8h dtcr6 8h sar7 8h dtcr7 9h ditto 9h ditto 9h ditto 9h ditto ah ditto ah ditto ah ditto ah ditto bh ditto bh ditto bh ditto bh ditto ch dar6 ch ch dar7 ch dh ditto dh dh ditto dh eh ditto eh eh ditto eh fh ditto fh fh ditto fh adr register name ffffe300h dcr 1h ditto 2h ditto 3h ditto 4h rsr 5h ditto 6h ditto 7h ditto 8h 9h ah bh ch dhr dh ditto eh ditto fh ditto
tmp19a64c1d tmp19a64 (rev1.1) -21-9 little-endian [12] cs/wait controller adr register name adr register name adr register name ffffe400h bma0 ffffe410h bma4 ffffe480h b01cs 1h ditto 1h ditto 1h ditto 2h ditto 2h ditto 2h ditto 3h ditto 3h ditto 3h ditto 4h bma1 4h bma5 4h b23cs 5h ditto 5h ditto 5h ditto 6h ditto 6h ditto 6h ditto 7h ditto 7h ditto 7h ditto 8h bma2 8h 8h b45cs 9h ditto 9h 9h ditto ah ditto ah ah ditto bh ditto bh bh ditto ch bma3 ch ch bexcs dh ditto dh dh ditto eh ditto eh eh ditto fh ditto fh fh ditto [13] access control [14] security control [15] flash control adr register name adr register name adr register name ffffe500h pfbwait ffffe510h dsusec1 ffffe520h flcs 1h 1h ditto 1h ditto 2h 2h ditto 2h ditto 3h 3h ditto 3h ditto 4h 4h dsusec2 4h 5h 5h ditto 5h 6h 6h ditto 6h 7h 7h ditto 7h 8h 8h romsec1 8h 9h 9h 9h ah ah ah bh bh bh ch ch romsec2 ch dh dh dh eh eh eh fh fh fh [16] rom correction adr register name adr register name adr register name ffffe540h addreg0 ffffe550h addreg4 ffffe560h addreg8 1h ditto 1h ditto 1h ditto 2h ditto 2h ditto 2h ditto 3h ditto 3h ditto 3h ditto 4h addreg1 4h addreg5 4h addreg9 5h ditto 5h ditto 5h ditto 6h ditto 6h ditto 6h ditto 7h ditto 7h ditto 7h ditto 8h addreg2 8h addreg6 8h addrega 9h ditto 9h ditto 9h ditto ah ditto ah ditto ah ditto bh ditto bh ditto bh ditto ch addreg3 ch addreg7 ch addregb dh ditto dh ditto dh ditto eh ditto eh ditto eh ditto fh ditto fh ditto fh ditto
tmp19a64c1d tmp19a64 (rev1.1) -21-10 little-endian [17] clock timer adr register name adr register name ffffe700h rtcflg ffffe710h 1h ditto 1h 2h ditto 2h 3h ditto 3h 4h rtccr 4h 5h ditto 5h 6h ditto 6h 7h ditto 7h 8h rtcreg 8h 9h ditto 9h ah ditto ah bh ditto bh ch ch dh dh eh eh fh fh [18] cg adr register name adr register name adr register name ffffee00h syscr0 ffffee10h imcga ffffee20h eicrcg 1h syscr1 1h ditto 1h ditto 2h syscr2 2h ditto 2h ditto 3h syscr3 3h ditto 3h ditto 4h 4h imcgb 4h nmiflg 5h 5h ditto 5h ditto 6h 6h ditto 6h ditto 7h 7h ditto 7h ditto 8h 8h imcgc 8h 9h 9h ditto 9h ah ah ditto ah bh bh ditto bh ch ch imcgd ch dh dh ditto dh eh eh ditto eh fh fh ditto fh
tmp19a64c1d tmp19a64 (rev1.1) -21-11 big-endian [1] port registers adr register name adr register name adr register name fffff000h p0 fffff010h fffff020h p4cr 1h p1 1h 1h p4fc 2h p0cr 2h p2 2h 3h 3h 3h 4h p1cr 4h p2cr 4h 5h p1fc 5h p2fc 5h 6h 6h 6h 7h 7h 7h 8h 8h p3 8h p5 9h 9h 9h p6 ah ah p3cr ah bh bh p3fc bh ch ch ch p5cr dh dh dh p5fc eh eh p4 eh p6cr fh fh fh p6fc adr register name adr register name adr register name adr register name fffff040h p7 fffff050h pb fffff060h pf fffff070h pj 1h p8 1h pc 1h pg 1h pk 2h p9 2h pd 2h ph 2h 3h pa 3h pe 3h pi 3h 4h 4h pbcr 4h pfcr 4h pjcr 5h 5h pccr 5h pgcr 5h pkcr 6h 6h pdcr 6h phcr 6h 7h pacr 7h pecr 7h picr 7h 8h p7fc 8h pbfc 8h pffc 8h pjfc 9h p8fc 9h pcfc 9h pgfc 9h pkfc ah p9fc ah pdfc ah phfc ah bh pafc bh pefc bh pifc bh ch ch ch pfode ch dh dh pcode dh dh eh eh pdode eh eh fh fh peode fh fh adr register name adr register name fffff0c0h pl fffff0d0h pp 1h pm 1h pq 2h pn 2h 3h po 3h 4h plcr 4h ppcr 5h pmcr 5h pqcr 6h pncr 6h 7h pocr 7h 8h 8h ppfc 9h 9h ah ah bh pofc bh ch ch ppfc2 dh dh pqfc2 eh eh fh poode fh
tmp19a64c1d tmp19a64 (rev1.1) -21-12 big-endian [2] wdt adr register name fffff090h wdmod 1h wdcr 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh [3] 16-bit timer adr register name adr register name adr register name adr register name fffff140h tb0run fffff150h tb1run fffff160h tb2run fffff170h tb3run 1h tb0cr 1h tb1cr 1h tb2cr 1h tb3cr 2h tb0mod 2h tb1mod 2h tb2mod 2h tb3mod 3h tb0ffcr 3h tb1ffcr 3h tb2ffcr 3h tb3ffcr 4h tb0st 4h tb1st 4h tb2st 4h tb3st 5h 5h 5h 5h 6h tb0ucl 6h tb1ucl 6h tb2ucl 6h tb3ucl 7h tb0uch 7h tb1uch 7h tb2uch 7h tb3uch 8h tb0rg0l 8h tb1rg0l 8h tb2rg0l 8h tb3rg0l 9h tb0rg0h 9h tb1rg0h 9h tb2rg0h 9h tb3rg0h ah tb0rg1l ah tb1rg1l ah tb2rg1l ah tb3rg1l bh tb0rg1h bh tb1rg1h bh tb2rg1h bh tb3rg1h ch tb0cp0l ch tb1cp0l ch tb2cp0l ch tb3cp0l dh tb0cp0h dh tb1cp0h dh tb2cp0h dh tb3cp0h eh tb0cp1l eh tb1cp1l eh tb2cp1l eh tb3cp1l fh tb0cp1h fh tb1cp1h fh tb2cp1h fh tb3cp1h adr register name adr register name adr register name adr register name fffff180h tb4run fffff190h tb5run fffff1a0h tb6run fffff1b0h tb7run 1h tb4cr 1h tb5cr 1h tb6cr 1h tb7cr 2h tb4mod 2h tb5mod 2h tb6mod 2h tb7mod 3h tb4ffcr 3h tb5ffcr 3h tb6ffcr 3h tb7ffcr 4h tb4st 4h tb5st 4h tb6st 4h tb7st 5h 5h 5h 5h 6h tb4ucl 6h tb5ucl 6h tb6ucl 6h tb7ucl 7h tb4uch 7h tb5uch 7h tb6uch 7h tb7uch 8h tb4rg0l 8h tb5rg0l 8h tb6rg0l 8h tb7rg0l 9h tb4rg0h 9h tb5rg0h 9h tb6rg0h 9h tb7rg0h ah tb4rg1l ah tb5rg1l ah tb6rg1l ah tb7rg1l bh tb4rg1h bh tb5rg1h bh tb6rg1h bh tb7rg1h ch tb4cp0l ch tb5cp0l ch tb6cp0l ch tb7cp0l dh tb4cp0h dh tb5cp0h dh tb6cp0h dh tb7cp0h eh tb4cp1l eh tb5cp1l eh tb6cp1l eh tb7cp1l fh tb4cp1h fh tb5cp1h fh tb6cp1h fh tb7cp1h
tmp19a64c1d tmp19a64 (rev1.1) -21-13 big-endian adr register name adr register name adr register name fffff1c0h tb8run fffff1d0h tb9run fffff1e0h tbarun 1h tb8cr 1h tb9cr 1h tbacr 2h tb8mod 2h tb9mod 2h tbamod 3h tb8ffcr 3h tb9ffcr 3h tbaffcr 4h tb8st 4h tb9st 4h tbast 5h 5h 5h 6h tb8ucl 6h tb9ucl 6h tbaucl 7h tb8uch 7h tb9uch 7h tbauch 8h tb8rg0l 8h tb9rg0l 8h tbarg0l 9h tb8rg0h 9h tb9rg0h 9h tbarg0h ah tb8rg1l ah tb9rg1l ah tbarg1l bh tb8rg1h bh tb9rg1h bh tbarg1h ch tb8cp0l ch tb9cp0l ch tbacp0l dh tb8cp0h dh tb9cp0h dh tbacp0h eh tb8cp1l eh tb9cp1l eh tbacp1l fh tb8cp1h fh tb9cp1h fh tbacp1h [4] i2c/sio [5] uart/sio adr register name adr register name adr register name adr register name fffff250h sbicr1 fffff260h sc0buf fffff270h sc1buf fffff280h sc2buf 1h sbidbr 1h sc0cr 1h sc1cr 1h sc2cr 2h i2car 2h sc0mod0 2h sc1mod0 2h sc2mod0 3h sbicr2/sr 3h br0cr 3h br1cr 3h br2cr 4h sbibr0 4h br0add 4h br1add 4h br2add 5h 5h sc0mod1 5h sc1mod1 5h sc2mod1 6h 6h sc0mod2 6h sc1mod2 6h sc2mod2 7h sbicr0 7h sc0en 7h sc1en 7h sc2en 8h 8h sc0rfc 8h sc1rfc 8h sc2rfc 9h 9h sc0tfc 9h sc1tfc 9h sc2tfc ah ah sc0rst ah sc1rst ah sc2rst bh bh sc0tst bh sc1tst bh sc2tst ch ch sc0fcnf ch sc1fcnf ch sc2fcnf dh dh dh dh eh eh eh eh fh fh fh fh adr register name adr register name adr register name adr register name fffff290h sc3buf fffff2a0h sc4buf fffff2b0h sc5buf fffff2c0h sc6buf 1h sc3cr 1h sc4cr 1h sc5cr 1h sc6cr 2h sc3mod0 2h sc4mod0 2h sc5mod0 2h sc6mod0 3h br3cr 3h br4cr 3h br5cr 3h br6cr 4h br3add 4h br4add 4h br5add 4h br6add 5h sc3mod1 5h sc4mod1 5h sc5mod1 5h sc6mod1 6h sc3mod2 6h sc4mod2 6h sc5mod2 6h sc6mod2 7h sc3en 7h sc4en 7h sc5en 7h sc6en 8h sc3rfc 8h sc4rfc 8h sc5rfc 8h sc6rfc 9h sc3tfc 9h sc4tfc 9h sc5tfc 9h sc6tfc ah sc3rst ah sc4rst ah sc5rst ah sc6rst bh sc3tst bh sc4tst bh sc5tst bh sc6tst ch sc3fcnf ch sc4fcnf ch sc5fcnf ch sc6fcnf dh dh dh dh eh eh eh eh fh fh fh fh
tmp19a64c1d tmp19a64 (rev1.1) -21-14 big-endian [6] 10-bit adc [7] kwup adr register name adr register name adr register name adr register name fffff300h adreg08l fffff310h adregspl fffff360h kwupst0 fffff370h kwupst 1h adreg08h 1h adregsph 1h kwupst1 1h kuppup 2h adreg19l 2h adcomregl 2h kwupst2 2h 3h adreg19h 3h adcomregh 3h kwupst3 3h 4h adreg2al 4h admod0 4h kwupst4 4h 5h adreg2ah 5h admod1 5h kwupst5 5h 6h adreg3bl 6h admod2 6h kwupst6 6h 7h adreg3bh 7h admod3 7h kwupst7 7h 8h adreg4cl 8h admod4 8h 8h 9h adreg4ch 9h 9h 9h ah adreg5dl ah ah ah bh adreg5dh bh bh bh ch adreg6el ch adclk ch ch dh adreg6eh dh dh dh eh adreg7fl eh eh eh fh adreg7fh fh fh fh [8] 32-bit input capture adr register name adr register name adr register name fffff400h tccr fffff410h cap0cr fffff420h cap2cr 1h tbtrun 1h 1h 2h tbtcr 2h 2h 3h 3h 3h 4h tbtcap0 4h tccap0ll 4h tccap2ll 5h tbtcap1 5h tccap0lh 5h tccap2lh 6h tbtcap2 6h tccap0hl 6h tccap2hl 7h tbtcap3 7h tccap0hh 7h tccap2hh 8h tbtrdcap0 8h cap1cr 8h cap3cr 9h tbtrdcap1 9h 9h ah tbtrdcap2 ah ah bh tbtrdcap3 bh bh ch tcgim ch tccap1ll ch tccap3ll dh tcgst dh tccap1lh dh tccap3lh eh eh tccap1hl eh tccap3hl fh fh tccap1hh fh tccap3hh [9] 32-bit output compare adr register name adr register name adr register name adr register name fffff440h tccmp0ll fffff450h tccmp4ll fffff460h tccmp8ll fffff470h cmpctl0 1h tccmp0lh 1h tccmp4lh 1h tccmp8lh 1h cmpctl1 2h tccmp0hl 2h tccmp4hl 2h tccmp8hl 2h cmpctl2 3h tccmp0hh 3h tccmp4hh 3h tccmp8hh 3h cmpctl3 4h tccmp1ll 4h tccmp5ll 4h tccmp9ll 4h cmpctl4 5h tccmp1lh 5h tccmp5lh 5h tccmp9lh 5h cmpctl5 6h tccmp1hl 6h tccmp5hl 6h tccmp9hl 6h cmpctl6 7h tccmp1hh 7h tccmp5hh 7h tccmp9hh 7h cmpctl7 8h tccmp2ll 8h tccmp6ll 8h 8h cmpctl8 9h tccmp2lh 9h tccmp6lh 9h 9h cmpctl9 ah tccmp2hl ah tccmp6hl ah ah bh tccmp2hh bh tccmp6hh bh bh ch tccmp3ll ch tccmp7ll ch ch dh tccmp3lh dh tccmp7lh dh dh eh tccmp3hl eh tccmp7hl eh eh fh tccmp3hh fh tccmp7hh fh fh
tmp19a64c1d tmp19a64 (rev1.1) -21-15 big-endian [10] intc adr register name adr register name adr register name adr register name ffffe000h imc0 ffffe010h imc4 ffffe020h imc8 ffffe030h imcc 1h ditto 1h ditto 1h ditto 1h ditto 2h ditto 2h ditto 2h ditto 2h ditto 3h ditto 3h ditto 3h ditto 3h ditto 4h imc1 4h imc5 4h imc9 4h imcd 5h ditto 5h ditto 5h ditto 5h ditto 6h ditto 6h ditto 6h ditto 6h ditto 7h ditto 7h ditto 7h ditto 7h ditto 8h imc2 8h imc6 8h imca 8h imce 9h ditto 9h ditto 9h ditto 9h ditto ah ditto ah ditto ah ditto ah ditto bh ditto bh ditto bh ditto bh ditto ch imc3 ch imc7 ch imcb ch imcf dh ditto dh ditto dh ditto dh ditto eh ditto eh ditto eh ditto eh ditto fh ditto fh ditto fh ditto fh ditto adr register name adr register name adr register name ffffe040h ivr ffffe060h intclr ffffe100h 1h ditto 1h ditto 1h 2h ditto 2h ditto 2h 3h ditto 3h ditto 3h 4h 4h 4h 5h 5h 5h 6h 6h 6h 7h 7h 7h 8h 8h 8h 9h 9h 9h ah ah ah bh bh bh ch ch ch ilev dh dh dh ditto eh eh eh ditto fh fh fh ditto
tmp19a64c1d tmp19a64 (rev1.1) -21-16 big-endian [11] dmac adr register name adr register name adr register name adr register name ffffe200h ccr0 ffffe210h bcr0 ffffe220h ccr1 ffffe230h bcr1 1h ditto 1h ditto 1h ditto 1h ditto 2h ditto 2h ditto 2h ditto 2h ditto 3h ditto 3h ditto 3h ditto 3h ditto 4h csr0 4h 4h csr1 4h 5h ditto 5h 5h ditto 5h 6h ditto 6h 6h ditto 6h 7h ditto 7h 7h ditto 7h 8h sar0 8h dtcr0 8h sar1 8h dtcr1 9h ditto 9h ditto 9h ditto 9h ditto ah ditto ah ditto ah ditto ah ditto bh ditto bh ditto bh ditto bh ditto ch dar0 ch ch dar1 ch dh ditto dh dh ditto dh eh ditto eh eh ditto eh fh ditto fh fh ditto fh adr register name adr register name adr register name adr register name ffffe240h ccr2 ffffe250h bcr2 ffffe260h ccr3 ffffe270h bcr3 1h ditto 1h ditto 1h ditto 1h ditto 2h ditto 2h ditto 2h ditto 2h ditto 3h ditto 3h ditto 3h ditto 3h ditto 4h csr2 4h 4h csr3 4h 5h ditto 5h 5h ditto 5h 6h ditto 6h 6h ditto 6h 7h ditto 7h 7h ditto 7h 8h sar2 8h dtcr2 8h sar3 8h dtcr3 9h ditto 9h ditto 9h ditto 9h ditto ah ditto ah ditto ah ditto ah ditto bh ditto bh ditto bh ditto bh ditto ch dar2 ch ch dar3 ch dh ditto dh dh ditto dh eh ditto eh eh ditto eh fh ditto fh fh ditto fh adr register name adr register name adr register name adr register name ffffe280h ccr4 ffffe290h bcr4 ffffe2a0h ccr5 ffffe2b0h bcr5 1h ditto 1h ditto 1h ditto 1h ditto 2h ditto 2h ditto 2h ditto 2h ditto 3h ditto 3h ditto 3h ditto 3h ditto 4h csr4 4h 4h csr5 4h 5h ditto 5h 5h ditto 5h 6h ditto 6h 6h ditto 6h 7h ditto 7h 7h ditto 7h 8h sar4 8h dtcr4 8h sar5 8h dtcr5 9h ditto 9h ditto 9h ditto 9h ditto ah ditto ah ditto ah ditto ah ditto bh ditto bh ditto bh ditto bh ditto ch dar4 ch ch dar5 ch dh ditto dh dh ditto dh eh ditto eh eh ditto eh fh ditto fh fh ditto fh
tmp19a64c1d tmp19a64 (rev1.1) -21-17 big-endian adr register name adr register name adr register name adr register name ffffe2c0h ccr6 ffffe2d0h bcr6 ffffe2e0h ccr7 ffffe2f0h bcr7 1h ditto 1h ditto 1h ditto 1h ditto 2h ditto 2h ditto 2h ditto 2h ditto 3h ditto 3h ditto 3h ditto 3h ditto 4h csr6 4h 4h csr7 4h 5h ditto 5h 5h ditto 5h 6h ditto 6h 6h ditto 6h 7h ditto 7h 7h ditto 7h 8h sar6 8h dtcr6 8h sar7 8h dtcr7 9h ditto 9h ditto 9h ditto 9h ditto ah ditto ah ditto ah ditto ah ditto bh ditto bh ditto bh ditto bh ditto ch dar6 ch ch dar7 ch dh ditto dh dh ditto dh eh ditto eh eh ditto eh fh ditto fh fh ditto fh adr register name ffffe300h dcr 1h ditto 2h ditto 3h ditto 4h rsr 5h ditto 6h ditto 7h ditto 8h 9h ah bh ch dhr dh ditto eh ditto fh ditto
tmp19a64c1d tmp19a64 (rev1.1) -21-18 big-endian [12] cs/wait controller adr register name adr register name adr register name ffffe400h bma0 ffffe410h bma4 ffffe480h b01cs 1h ditto 1h ditto 1h ditto 2h ditto 2h ditto 2h ditto 3h ditto 3h ditto 3h ditto 4h bma1 4h bma5 4h b23cs 5h ditto 5h ditto 5h ditto 6h ditto 6h ditto 6h ditto 7h ditto 7h ditto 7h ditto 8h bma2 8h 8h b45cs 9h ditto 9h 9h ditto ah ditto ah ah ditto bh ditto bh bh ditto ch bma3 ch ch bexcs dh ditto dh dh ditto eh ditto eh eh ditto fh ditto fh fh ditto [13]access control [14] secur ity control [15] flash control adr register name adr register name adr register name ffffe500h ffffe510h dsusec1 ffffe520h flcs 1h 1h ditto 1h ditto 2h 2h ditto 2h ditto 3h pfbwait 3h ditto 3h ditto 4h 4h dsusec2 4h 5h 5h ditto 5h 6h 6h ditto 6h 7h 7h ditto 7h 8h 8h romsec1 8h 9h 9h 9h ah ah ah bh bh bh ch ch romsec2 ch dh dh dh eh eh eh fh fh fh [16] rom correction adr register name adr register name adr register name ffffe540h addreg0 ffffe550h addreg4 ffffe560h addreg8 1h ditto 1h ditto 1h ditto 2h ditto 2h ditto 2h ditto 3h ditto 3h ditto 3h ditto 4h addreg1 4h addreg5 4h addreg9 5h ditto 5h ditto 5h ditto 6h ditto 6h ditto 6h ditto 7h ditto 7h ditto 7h ditto 8h addreg2 8h addreg6 8h addrega 9h ditto 9h ditto 9h ditto ah ditto ah ditto ah ditto bh ditto bh ditto bh ditto ch addreg3 ch addreg7 ch addregb dh ditto dh ditto dh ditto eh ditto eh ditto eh ditto fh ditto fh ditto fh ditto
tmp19a64c1d tmp19a64 (rev1.1) -21-19 big-endian [17] clock timer adr register name adr register name ffffe700h rtcflg ffffe710h 1h ditto 1h 2h ditto 2h 3h ditto 3h 4h rtccr 4h 5h ditto 5h 6h ditto 6h 7h ditto 7h 8h rtcreg 8h 9h ditto 9h ah ditto ah bh ditto bh ch ch dh dh eh eh fh fh [18] cg adr register name adr register name adr register name ffffee00h syscr3 ffffee10h imcga ffffee20h eicrcg 1h syscr2 1h ditto 1h ditto 2h syscr1 2h ditto 2h ditto 3h syscr0 3h ditto 3h ditto 4h 4h imcgb 4h nmiflg 5h 5h ditto 5h ditto 6h 6h ditto 6h ditto 7h 7h ditto 7h ditto 8h 8h imcgc 8h 9h 9h ditto 9h ah ah ditto ah bh bh ditto bh ch ch imcgd ch dh dh ditto dh eh eh ditto eh fh fh ditto fh
TMP19A64C1DXBG 22. electrical characteristics the letter x in equations presented in this chapter represents the cycle peri od of the fsys clock selected through the programming of the syscr1.sysck bit. t he fsys clock may be derived from either the high-speed or low-speed crystal oscillat or. the programming of the clock gear function also affects the fsys frequency. all relevant values in this chapter are calculated with the high-speed (fc) system clock (syscr1.sysck = 0) and a clo ck gear factor of 1/fc (syscr1.gear[2:0] = 000). 22.1 absolute maximum ratings parameter symbol rating unit vcc2 (core) ? 0.3 to 3.0 vcc3 i/o ? 0.3 to 3.9 avcc a/d ? 0.3 to 3.9 supply voltage bvcc ? 0.3 to 3.9 v supply voltage v in ? 0.3 to v cc + 0.3 v per pin i ol 5 low-level output current total i ol 50 per pin i oh -5 high-level output current total i oh 50 ma power dissipation (ta = 85c) pd 600 mw soldering temperature (10 s) t solder 260 storage temperature t stg ? 40 to 125 except during flash w/e -20 to 85 operating temperature during flash w/e t opr 0 to 70 write/erase cycles n ew 100 cycle v cc15 dvcc15 cvcc15 fvcc15 v cc 3 dvcc3n n 0 to 4 avcc avcc3m m 1 to 2 v ss dvss avss cvss fvss note: the absolute maximum rating is a rating that must never be exceeded, even for an instant. not a single absolute maximum rating value can be exceeded. if any absolute maximum rating value is exceeded, the product may be damaged or weakened, or damage or combustion may cause personal injury. always be sure to design your application devices so the absolute maximum rating is never exceeded. 19a64(rev1.1)22-1
TMP19A64C1DXBG 22.2 dc electrical characteristics (1/3) ta 20 to 85 parameter symbol conditions min typ (note 1) max unit dvcc15 fosc = 8 to 13.5mhz fs = 30khz to 34khz fsys = 30khz to 54mhz plloff="1" 1.35 1.65 bvcc fsys = 16khz to 54mhz 1.8 3.3 supply voltage cvcc15 dvcc15 cvss dvss0v dvcc3n (n 0 to 4) fsys = 4 to 54mhz 1.65 3.3 v p7 to p9 (used as a port) v il1 2.7v Q avcc32Q avcc31Q 3.3v 0.3avcc31 0.3avcc32 1.65v Q dvcc3n Q 3.3v n=0 to 4 normal port v il2 1.8v Q bvcc Q 3.3v 0.3dvcc3n 0.3bvcc 1.65v Q dvcc3n Q 3.3v n=0 to 4 1.8v Q bvcc Q 3.3v 0.2dvcc3n 0.2bvcc schmitt-triggered port v il3 1.35v Q dvcc15 Q 1.65v 0.1dvcc15 x1 v il4 1.35v Q cvcc15 Q 1.65v 0.1cvcc low-level input voltage xt1 v il5 1.8v Q bvcc Q 3.3v ? 0.3 0.1cvcc v note1: bvcc normal mode 2.3v to 3.3v,backup mode 1.8v to 3.3v 19a64(rev1.1)22-2
TMP19A64C1DXBG ta 20 to 85 parameter symbol conditions min. typ (note 1) max. unit p7 to p9 (used as a port) v ih1 2.7v Q avcc32Q avcc31Q 3.3v 0.7avcc31 0.7avcc32 1.65v Q dvcc3n Q 3.3v n=0 to 4 normal port v ih2 1.8v Q bvcc Q 3.3v 0.7dvcc3n 0.7bvcc 1.65v Q dvcc3n Q 3.3v n=0 to 4 1.8v Q bvcc Q 3.3v 0.8dvcc3n 0.8bvcc schmitt-triggered port v ih3 1.35v Q dvcc15 Q 1.65v 0.9dvcc15 x1 v ih4 1.35v Q cvccQ 1.65v 0.9cvcc high-level input voltage xt2 v ih4 1.8v Q bvcc Q 3.3v 0.9bvcc dvcc3n + 0. 3 bvcc + 0.3 dvcc15 + 0. 2 cvcc+ 0.2 v i ol = 2ma dvcc3n R 2.7v 0.4 low-level output voltage v ol i ol = 500 a dvcc3n 2.7v 0.2dvcc3n Q0.4 i oh = ? 2ma dvcc3n R 2.7v 2.4 high-level output voltage v oh i oh = ? 500 a dvcc3n 2.7v 0.8dvcc3n v note 1: ta = 25c, dvcc15=1.5v,dvcc3n =3.0v, bvcc=3.0v, avcc3m=3.3v, unless otherwise noted 19a64(rev1.1)22-3
TMP19A64C1DXBG 22.3 dc electrical characteristics (2/3) ta 20 to 85 parameter symbol conditions min. typ (note 1) max. unit input leakage current i li 0.0 Q v in Q dvcc15 0.0 Q v in Q bvcc 0.0 Q v in Q dvcc3nn=0 to 4 0.0 Q v in Q avcc31 0.0 Q v in Q avcc32 0.02 5 output leakage current i lo 0.2 Q v in Q dvcc15 ? 0.2 0.2 Q v in Q bvcc ? 0.2 0.2 Q v in Q dvcc3n ? 0.2n=0 to 4 0.2 Q v in Q avcc31 ? 0.2 0.2 Q v in Q avcc32 ? 0.2 0.05 10 a v stop (dvcc15) 1.35 1.65 v stop1 (bvcc) 1.8 3.3 v stop2 (avcc3) v il1 = 0.3avcc31,32 v ih1 = 0.7avcc31,32 2.7 3.6 power-down voltage (stop mode ram backup) v stop3 (dvcc3) v il2 = 0.3dvcc3n, v il3 = 0.1dvcc3n v ih2 = 0.7dvcc3n, v ih3 = 0.9dvcc3n n=0 to 4 1.65 3.3 v pull-up resister at reset rrst dvcc15 = 1.5v 0.15v 20 50 150 k schmitt-triggered port vth 1.65vQdvcc3nQ3.3vn=0 to 4 1.8vQbvccQ3.3v 1.35vQdvcc15Q1.65v 0.3 0.6 v programmable pull-up/ pull-down resistor pkh dvcc3n = 1.65v to 3.3vn=0 to 4 dvcc15 = 1.35v to 1.65v bvcc = 1.8v to 3.3v 20 50 150 k pin capacitance (except power supply pins) c io fc = 1mhz 10 pf note 1: ta = 25c, dvcc15=1.5v,dvcc3n =3.0v, bvcc=3.0v, avcc3m=3.3v, unless otherwise noted 19a64(rev1.1)22-4
TMP19A64C1DXBG 22.4 dc electrical char acteristics (3/3) dvcc15 cvcc15 fvcc15 1.35v to 1.65v, dvcc3n fvcc3 2.7v to 3.3v, avcc3m 2.7v to 3.3v, bvcc=1.8v to 3.3v ta 20 to 85 n 0 to 4 m 1,2 parameter symbol conditions min. typ. (note 1) max. unit normal (note 2): gear = 1/1 50 60 idle(doze) 18 28 idle(halt) fsys = 54 mhz (fosc = 13.5 mhz, plloff="dvcc15") 14 23 ma slow fsys = 32.768khz (fs 32.768khz ) 300 970 a sleep fsys = 32.768khz (fs 32.768khz ) 100 950 a stop dvcc15 = cvcc15 = 1.35 to 1.65v bvcc 1.8 to 3.3v dvcc3n = 1.65 to 3.3v avcc3m = 2.7 to 3.3v 90 900 a backup icc bvcc 1.8 to 3.3v 3 5 a note 1: ta = 25c, dvcc15=1.5v,dvcc3n =3.0v, bvcc=3.0v, avcc3m=3.3v, unless otherwise noted note 2: measured with the cpu dhrystone operating, all i/o peripherals channel on, and 16-bit external bus operated with 4 system clocks. note 3: the supply current flowing through the dvcc15 bvcc dvcc3n cvcc15 and avcc3m pins is included in the digital supply current parameter (icc). 19a64(rev1.1)22-5
TMP19A64C1DXBG 22.5 10-bit adc electrical characteristics dvcc15 = cvcc15 = 1.35v to 1.65v, avcc3m = 2.7v to 3.3v, avss = dvss, ta 20 to 85 parameter symbol conditions min typ max unit 2.7 3.3 analog reference voltage ( + ) vrefh avcc3m ? 0.3 avcc avcc3m + 0.3 v analog reference voltage ( ? ) vrefl avss avss avss + 0 .2 v analog input voltage vain vrefl vrefh v a/d conversion avcc3m = vrefh = 3.0v 0.3v dvss = avss = vrefl 1.15 1.8 ma analog supply current non-a/d conversion iref avcc3m = vrefh = 2.7 to 3.3v dvss = avss = vrefl 0.1 10.0 a analog input capacitance ? 1.0 2.0 pf analog input impedance ? 2.0 3.5 k inl error ? 2 3 lsb dnl error ? 1 3 lsb offset error ? 2 3 lsb gain error ? avcc3m = vrefh = 3.0 v 0.3 v dvss = avss = vrefl ain resistance < 1.3k ain load capacitance < 20 pf avccm load capacitance 10 f vrefh load capacitance 10 f conversion time 7.85 s 2 4 lsb note 1: 1lsb = (vrefh ? vrefl)/1024[v] note 2: the supply current flowing through the avcc 3m pin is included in the digital supply current parameter (icc). 19a64(rev1.1)22-6
TMP19A64C1DXBG 22.6 ac electrical characteristics 1 separate bus mode (1)dvcc15 cvcc15 fvcc15 1.35v to 1.65v, dvcc3n fvcc3 2.3v to 3.3v syscr3 = ?0?, 2 programmed wait state equation 54 mhz (fsys) unit no. parameter symbol min max min max 1 system clock period (x) t sys 18.5 ns 2 a0-a23 valid to rd , wr or hwr asserted t ac (1+ale)x-20 17 ns 3 a0-a23 hold after rd , wr or hwr negated t car x-14 4.5 ns 4 a0-a23 valid to d0-d15 data in t ad x(2+tw+ale)-42 50.5 ns 5 rd asserted to d0-d15 data in t rd x(1+tw)-28 27.5 ns 6 rd width low t rr x(1+tw)-10 45.5 ns 7 d0-d15 hold after rd negated t hr 0 0 ns 8 negated to next a0-a23 output t rae x-15 3.5 ns rd 9 wr /hwr width low t ww x(1+tw)-10 45.5 ns 10 wr or hwr asserted to d0-d15 valid t do 12.3 12.3 ns 11 d0-d15 hold after wr or hwr negated t dw x(1+tw)-18 37.5 ns 12 d0-d15 hold after wr or hwr negated t wd x ? 1 5 3.5 ns 13 a0-a23 valid to wait input t aw x+(ale)x+(tw-1 )x -30 25.5 ns 14 wait hold after rd , wr or hwr asserted t cw x(tw-3)+7 x(tw-1)-17 25.5 38.5 ns note 1: no. 1 to 13 internal 2 wait insertion ale 1 clock @54mhz tw = (auto wait insertion + 2n) no. 14 conditions (auto wait insertion + 2n) tw = 2 + 2*1 = 4 ac measurement conditions: output levels: high = 0.8dvcc33 v/low 0.2dvcc33 v, cl = 30 pf input levels: high = 0.7dvcc33 v/low 0.3dvcc33 v 19a64(rev1.1)22-7
TMP19A64C1DXBG (2) dvcc15 cvcc15 fvcc15 1.35v to 1.65v, dvcc3n fvcc3 1.65v to 1.95v syscr3 = ?0?, 2programmed wait state equation 54 mhz (fsys) unit no. parameter symbol min max min max 1 system clock period (x) t sys 18.5 ns 2 a0-a23 valid to rd , wr or hwr asserted t ac (1+ale)x-20 17 ns 3 a0-a23 hold after rd , wr or hwr negated t car x-7 11.5 ns 4 a0-a23 valid to d0-d15 data in t ad x(2+tw+ale)-42 50.5 ns 5 rd asserted to d0-d15 data in t rd x(1+tw)-28 27.5 ns 6 rd width low t rr x(1+tw)-10 45.5 ns 7 d0-d15 hold after rd negated t hr 0 0 ns 8 negated to next a0-a23 output t rae x-15 3.5 ns rd 9 wr /hwr width low t ww x(1+tw)-10 45.5 ns 10 or hwr asserted to d0-d15 valid t do 12.3 12.3 ns wr 11 d0-d15 hold after wr or hwr negated t dw x(1+tw)-18 37.5 ns 12 d0-d15 hold after wr or hwr negated t wd x ? 1 5 3.5 ns 13 a0-a23 valid to wait input t aw x+(ale)x+(tw-1 )x -30 25.5 ns 14 wait hold after rd , wr or hwr asserted t cw x(tw-3)+7 x(tw-1)-17 25.5 38.5 ns note 1: no. 1 to 13 internal 2 wait insertion ale 1 clock @54mhz tw = (auto wait + 2n) no. 14 conditions (auto wait insertion + 2n) tw = 2 + 2*1 = 4 ac measurement conditions: output levels: high = 0.8dvcc33 v/low 0.2dvcc33 v, cl = 30 pf input levels: high = 0.7dvcc33 v/low 0.3dvcc33 v 19a64(rev1.1)22-8
TMP19A64C1DXBG (1) read cycle timing (syscr3 = 0, 1 programmed wait state) t car t rr t hr t ad internal clk rd t ac t rd a0~23 4clk/1bus cycle s1 s2 s0 s1 sw d0 15 d0~15 t rae cs0~3 r/w 19a64(rev1.1)22-9
TMP19A64C1DXBG (2) read cycle timing (syscr3 = 1, 1 programmed wait state) t car t rr t hr t ad t ad internalclk rd s1i s1 s2 s0 s1i d0 15 d0~15 t ac t rd a16~23 5clk/1bus cycle sw t rae cs0~3 r/w 19a64(rev1.1)22-10
TMP19A64C1DXBG (2) read cycle timing syscr3 = 1, 4 ex ternally generated wait states with n = 1) t aw internal clk rd a0~23 8clk/1bus cycle wait d0~15 d0 15 s1 sw swe sw s2 sw t cw cs0~3 r/w s1i s0 19a64(rev1.1)22-11
TMP19A64C1DXBG (4) write cycle timing (syscr3 = 1, zero wait sate) t ww t car t dw internal clk wr, hwr cs0~3 r/w t ac a0~23 4clk/1bus cycle t wd d0 15 d0~15 t do 19a64(rev1.1)22-12
TMP19A64C1DXBG 2 multiplex bus mode (1) dvcc15 cvcc15 fvcc15 1.35v to 1.65v, dvcc3n fvcc3 2.3v to 3.3v 1. ale width = 1 clock cycle, 2 programmed wait state equation 54 mhz (fsys) unit no. parameter symbo l min max min max 1 system clock period (x) t sys 18.5 ns 2 a0-a15 valid to ale low t al (ale)x-12 6.5 ns 3 a0-a15 hold after ale low t la x-8 10.5 ns 4 ale pulse width high t ll (ale)x-6 12.5 ns 5 ale low to rd , wr or hwr asserted t lc x-8 10.5 ns 6 rd , wr or hwr negated to ale high t cl x-15 3.5 ns 7 a0-a15 valid to rd , wr or hwr asserted t acl 2x-20 17.0 ns 8 a16-a23 valid to rd , wr or hwr asserted t ach 2x-20 17.0 ns 9 a16-a23 hold after rd , wr or hwr negated t car x-14 4.5 ns 10 a0-a15 valid to d0-d15 data in t adl x(2+tw+ale)-42 50.5 ns 11 a16-a23 valid to d0-d15 data in t adh x(2+tw+ale)-42 50.5 ns 12 rd asserted to d0-d15 data in t rd x(1+tw)-28 27.5 ns 13 rd width low t rr x(1+tw)-10 45.5 ns 14 d0-d15 hold after rd negated t hr 0 0 ns 15 rd negated to next a0-a15 output t rae x-15 3.5 ns 16 wr / hwr width low t ww x(1+tw)-10 45.5 ns 17 d0-d15 valid to wr or hwr negated t dw x(1+tw)-18 37.5 ns 18 d0-d15 hold after wr or hwr negated t wd x-15 3.5 ns 19 a16-a23 valid to wait input t awh x+(ale)x+(tw-1)x-3 0 25.5 ns 20 a0-a15 valid to wait input t awl x+(ale)x+(tw-1)x-3 0 25.5 ns 21 wait hold after rd , wr or hwr asserted t cw x(tw-3)+7 x(tw-1)-17 25.5 38.5 ns note 1: no. 1 to 20 internal 2 wait insertion ale 1 clock @54mhz tw = (auto wait insertion + 2n) no. 21 conditions (auto wait + 2n) tw = 2 + 2*1 = 4 ac measurement conditions: output levels: high = 0.8dvcc33 v/low 0.2dvcc33 v, cl = 30 pf 19a64(rev1.1)22-13
TMP19A64C1DXBG input levels: high = 0.7dvcc33 v/low 0.3dvcc33 v (2) dvcc15 cvcc15 fvcc15 1.35v to 1.65v, dvcc3n fvcc3 1.65v to 1.95v ale width = 1 clock cycles, 2 programmed wait state equation 54 mhz (fsys) unit no. parameter symbo l min max min max 1 system clock period (x) t sys 18.5 ns 2 a0-a15 valid to ale low t al (ale)x-12 6.5 ns 3 a0-a15 hold after ale low t la x-8 10.5 ns 4 ale pulse width high t ll (ale)x-6 12.5 ns 5 ale low to rd , wr or hwr asserted t lc x-8 10.5 ns 6 rd , wr or hwr negated to ale high t cl x-15 3.5 ns 7 a0-a15 valid to rd , wr or hwr asserted t acl 2x-20 17.0 ns 8 a16-a23 valid to rd , wr or hwr asserted t ach 2x-20 17.0 ns 9 a16-a23 hold after rd , wr or hwr negated t car x-7 11.5 ns 10 a0-a15 valid to d0-d15 data in t adl x(2+tw+ale)-42 50.5 ns 11 a16-a23 valid to d0-d15 data in t adh x(2+tw+ale)-42 50.5 ns 12 rd asserted to d0-d15 data in t rd x(1+tw)-28 27.5 ns 13 rd width low t rr x(1+tw)-10 45.5 ns 14 d0-d15 hold after rd negated t hr 0 0 ns 15 rd negated to next a0-a15 output t rae x-15 3.5 ns 16 wr / hwr width low t ww x(1+tw)-10 45.5 ns 17 d0-d15 valid to wr or hwr negated t dw x(1+tw)-18 37.5 ns 18 d0-d15 hold after wr or hwr negated t wd x-15 3.5 ns 19 a16-a23 valid to wait input t awh x+(ale)x+(tw-1)x-3 0 25.5 ns 20 a0-a15 valid to wait input t awl x+(ale)x+(tw-1)x-3 0 25.5 ns 21 wait hold after rd , wr or hwr asserted t cw x(tw-3)+7 x(tw-1)-17 25.5 38.5 ns note 1: no. 1 to 20 internal 2 wait insertion ale 1 clock @54mhz tw = (auto insert wait + 2n) no. 21 conditions (auto 2 waits insertion + 2n) tw = 2 + 2*1 = 4 ac measurement conditions: output levels: high = 0.8dvcc33 v/low 0.2dvcc33 v, cl = 30 pf input levels: high = 0.7dvcc33 v/low 0.3dvcc33 v 19a64(rev1.1)22-14
TMP19A64C1DXBG (1) read cycle timing, ale width = 1 cl ock cycle, 1 programmed wait state t car t rr t hr t adh t adl t la d0 15 t al t cl t ll ale internal clk ad0~15 rd a0 15 t acl t ach t lc t rd a16~23 5clk/1bus cycle s1i s2 s3 s1 w1 t rae cs0~3 r/w s1 s2 s0 s1i sw 19a64(rev1.1)22-15
TMP19A64C1DXBG (2) read cycle timing, ale width = 1 cl ock cycle, 2 programmed wait state t car t rr t hr t adh t adl t la d0 15 t al t cl t ll ale internal clk ad0~1 5 rd a0 15 t acl t ach t lc t rd a16~2 3 6clk/1bus cycle t rae cs0~3 r/w 19a64(rev1.1)22-16
TMP19A64C1DXBG (3) read cycle timing, ale width = 1 cl ock cycle, 4 programmed wait state t awl/h ale internal clk ad0~15 rd a d16~23 8clk/1bus cycle wait d0 15 a0 15 t cw cs0~3 r/w 19a64(rev1.1)22-17
TMP19A64C1DXBG (4) read cycle timing, ale width = 2 cl ock cycle, 1 programmed wait state t rr t hr t adh t adl t la d0 15 t al t cl t ll ale internal clk ad0~15 rd s1i s1x sw s2 s0 a0 15 t acl t ach t lc t rd a16~23 6clk/1bus cycle s1 t rae cs0~3 r/w s1i 19a64(rev1.1)22-18
TMP19A64C1DXBG (5) read cycle timing, ale width = 2 cl ock cycle, 4 programmed wait state t awl/h ale internal clk ad0~15 rd ad16~23 9clk/1bus cycle wait d0 15 s1x s1 sw swex s0 a0 15 sw t cw cs0~3 r/w sw s2 s1x 19a64(rev1.1)22-19
TMP19A64C1DXBG (6) write cycle timing, ale width = 2 clock cycles, zero wait state t ww t car t dw t la d0 15 t al t cl t ll ale internal clk ad0~15 wr, hwr cs0~3 r/w a0 15 t acl t ach t lc ad16~23 5clk/1bus cycle t wd 19a64(rev1.1)22-20
TMP19A64C1DXBG (7) write cycle timing, ale width = 1 clock cycles, 2 wait state t ww t car t dw t la d0 15 t al t cl t ll al e internal clk ad0~1 5 wr, hwr cs0~ 3 r/ w a0 15 t acl t ach t lc ad16~2 3 6clk/1bus cycle t wd 19a64(rev1.1)22-21
TMP19A64C1DXBG (8) write cycle timing, ale width = 2 clock cycles, 4 wait state ale internal clk ad0~1 5 wr, hwr cs0~3 r/w ad16~2 3 9clk/1bus cycle t ww t car t dw t la d0 15 t al t cl t ll a0 15 t acl t ach t lc t wd wait t cw t awl/h 19a64(rev1.1)22-22
TMP19A64C1DXBG 22.7 transfer with dma request the following shows an example of a transfer between the on-chip ram and an external device in multiplex bus mode. ? 16-bit data bus width, non-recovery time ? level data transfer mode ? transfer size of 16 bits, devi ce port size (dps) of 16 bits ? source/destination: on-chip ram/external device the following shows transfer operation timing of the on-chip ram to an external bus during write operation (memory-to-memory transfer). gclkin dreqn a le hwr lwr a d[15:0] n transfer (n-1) transfer (n+1) transfe cs tdreq_w tdreq_w r/w a dd a dd a dd data data data gack 2clk 2clk ??? gbstart tdreq_r tdreq_r internal clock (1) indicates the condition under which nth transfer is performed successfully. (2) indicates the condition under which (n + 1)th transfer is not performed. 19a64(rev1.1)22-23
TMP19A64C1DXBG (1) dvcc15 cvcc15 fvcc15 1.35v to 1.65v, avcc3m fvcc3 2.7v to 3.3v dvcc33 2.3v to 3.3v, dvcc30/31/32/34 1.65v to 3.3v, ta 20 to 85 c m 1 to 2 equation 54 mhz (fsys) unit no. parameter symbol (1)min (2)max min max 2 rd asserted to dreqn negated (external device to on-chip ram transfer) tdreq_r w+1x 2wale8x 51 37 152.5 ns 3 wr / hwr rising to dreqn negated (on-chip ram to external device transfer) tdreq_w -(w+2)x 5+waitx51.8 -55.5 59.2 ns (2) dvcc15 cvcc15 fvcc15 1.35v to 1.65v, avcc3m =fvcc3 2.7v to 3.3v dvcc33 1.65v to 1.95v, dvcc30/31/32/34 1.65v to 3.3v, ta 20 to 85 c m 1 to 2 equation 54 mhz (fsys) unit no. parameter symbol (1)min (2)max min max 2 rd asserted to dreqn negated (external device to on-chip ram transfer) tdreq_r w+1 x 2w ale 8 x 56 37 147.5 ns 3 wr / hwr rising to dreqn negated (on-chip ram to external device transfer) tdreq_w -(w+2)x 5+waitx56.8 -55.5 54.2 ns w: number of wait-state cycles inserted. in the case of (2 + n) externally generated wait states with n = 1, w becomes 4 ale: apply ale = ale 1 clock, ale = 1 for ale 2 clock. the values in the above table are obtained with w = 1, ale = 1. 19a64(rev1.1)22-24
TMP19A64C1DXBG 22.8 serial channel timing (1) i/o interface mode (dvcc3n = 1.65v to 3.3v) in the table below, the letter x represents the fsys cycle period, which varies depending on the programming of the clock gear function. (1) sclk input mode (sio0 to sio6) equation 54 mhz parameter symbol min max min max unit sclk period t scy 12x 222 ns sclk clock high width(input) tsch 6x 111 ns sclk clock low width (input) tscl 6x 111 ns txd data to sclk rise or fall * t oss 2x-30 6 ns txd data hold after sclk rise or fall * t ohs 8x-15 129 ns rxd data valid to sclk rise or fall * t srd 30 30 ns rxd data hold after sclk rise or fall * t hsr 2x+30 66 ns * sclk rise or fall: measured relative to the programmed active edge of sclk. 2. sclk output mode (sio0 to sio6) equation 54 mhz parameter symbol min max min max unit sclk period t scy 8x 222 ns txd data to sclk rise or fall * t oss 4x-10 62 ns txd data hold after sclk rise or fall * t ohs 4x-10 62 ns rxd data valid to sclk rise or fall * t srd 45 45 ns rxd data hold after sclk rise or fall * t hsr 0 0 ns output data txd input data rxd sclk sck output mode/ active-high scl input mod 0 valid t oss t scy t ohs 1 2 3 t srd t hsr 0 1 2 3 valid valid valid sclk active-low sck input mode 19a64(rev1.1)22-25
TMP19A64C1DXBG 22.9 sbi timing (1) i2c mode in the table below, the letters x repr esent the fsys periods, respectively. n denotes the value of n programmed into the sck (scl output frequency select) field in the sbi0cr1. equation standard mode fast mode parameter symbol min max min max min max unit scl clock frequency t sc 0 0 100 0 400 khz hold time for start condition t hd:sta 4.0 0.6 s scl clock low width (input) (note 1) t low 4.7 1.3 s scl clock high width (output) (note 2) t high 4.0 0.6 s setup time for a repeated start condition t su;sta (note 5) 4.7 0.6 s data hold time (input) (note 3, 4) t hd;dat 0.0 0.0 s data setup time t su;dat 250 100 ns setup time for stop condition t su;sto 4.0 0.6 s bus free time between stop and start conditions t buf (note 5) 4.7 1.3 s note 1: scl clock low width (output) is calculated with : (2 n-1 +58)/(fsys/2) note 2: scl clock high width (output) is calculated with (2 n-1 +12)/(fsys/2) notice: on i 2 c-bus specification, maximum speed of standard mode is 100khz ,fast mode is 400khz. internal scl clock frequency setti ng should be shown above note1 & note2. note 3: the output data hold time is equal to 12x note 4: the philips i 2 c-bus specification states t hat a device must internally provide a hold time of at least 300 ns for the sda signal to bridge the undefined region of the fall edge of scl. however, the 19a64 sbi does not satisfy this requirement. also, the output buffer for scl does not incorporate slope control of the falli ng edges; therefore, the equipment manufacturer should design so that the input data hold time sh own in the table is satisfied, including tr/tf of the scl and sda lines. note 5: software-dependent sda scl t low t hd;sta t scl t high t r t su;dat t hd;dat t su;sta t su;sto t buf s: start condition sr: repeated start condition p: stop condition t f s sr p 19a64(rev1.1)22-26
TMP19A64C1DXBG (2) clock-synchronous 8-bit sio mode in the tables below, the letters x represent t he fsys cycle periods, respectively. the letter n denotes the value of n programmed into the sck (scl output frequency select) field in the sbi0cr1. the electrical specifications below are for an sck signal with a 50% duty cycle. sck input mode equation 54 mhz parameter symbol min max min max unit sck period t scy 16x 296 ns so data to sck rise t oss (t scy /2) ? ( 6 x + 3 0 ) 7 ns so data hold after sck rise t ohs (t scy /2) + 4x 222 ns si data valid to sck rise t srd 0 0 ns si data hold after sck rise t hsr 4x + 10 84 ns sck output mode equation 54 mhz parameter symbol min max min max unit sck period (programmable) t scy 16x 296 ns so data to sck rise t oss (t scy /2) ? 20 128 ns so data hold after sck rise t ohs (t scy /2) ? 20 128 ns si data valid to sck rise t srd 2x + 30 67 ns si data hold after sck rise t hsr 0 0 ns output data txd input data txd sclk 0 valid t oss t scy t ohs 1 2 3 t srd t hsr 0 1 2 3 valid valid valid 19a64(rev1.1)22-27
TMP19A64C1DXBG 22.10 event counter in the table below, the letter x represents the fsys cycle period. equation 54 mhz parameter symbol min max min max unit clock low pulse width t vckl 2x + 100 137 ns clock high pulse width t vckh 2x + 100 137 ns 22.11 timer capture in the table below, the letter x represents the fsys cycle period. equation 54 mhz parameter symbol min max min max unit low pulse width t cpl 2x + 100 137 ns high pulse width t cph 2x + 100 137 ns 22.12 general interrupts in the table below, the letter x represents the fsys cycle period. equation 54 mhz parameter symbol min max min max unit low pulse width for int0-inta t intal x + 100 118.5 ns high pulse width for int0-inta t intah x + 100 118.5 ns 22.13 nmi and stop /sleep wake-up interrupts equation 54 mhz parameter symbol min max min max unit low pulse width for nmi and int0-int4 t intbl 100 100 ns high pulse width for int0-int4 t intbh 100 100 ns 22.14 scout pin equation 54 mhz parameter symbol min max min max unit clock high pulse width t sch 0.5t ? 5 4.25 ns clock low pulse width t scl 0.5t ? 5 4.25 ns note: in the above table, the letter t represent s the cycle period of t he scout output clock. t sch t scl scout 19a64(rev1.1)22-28
TMP19A64C1DXBG 22.15 bus request and bus acknowledge signals t aba (note1) busrq a le a 0~a23, rd , wr busak cs0 ~ cs3 , w/r , hwr a d0~ad15 t baa (note2) (note2) equation 54 mhz parameter symbol min max min max unit bus float to busak asserted t aba 0 80 0 80 ns bus float after busak negated t baa 0 80 0 80 ns note 1: if the current bus cycle has not terminated due to wait-state insertion, the tmp19a64f20bxbg does not respond to busrq until the wait state ends. note 2: this broken line indicates that output buffers are disabled, not that the signals are at indeterminate states. the pin holds the last logic value present at that pin before the bus is relinqu ished. this is dynamically accomplished through external load capacitances. the equipment manufacturer may maintain the bus at a predefined state by means of off-chip restores, but he or she should design, considering the time (determined by the cr constant) it takes for a signal to reach a des ired state. the on-chip, integrated programmable pullup/pulldown resistors remain active, depending on internal signal states. 19a64(rev1.1)22-29
TMP19A64C1DXBG 22.16 kwup input pull-up register active equation 54 mhz parameter symbol min max min max unit low pulse width for key0-d tky tbl x+100 118 ns high pulse width for key0-d tky tbh x+100 118 ns 22.17 dual pulse input equation 54 mhz parameter symbol min max min max unit dual input pulse period tdcyc 8y 296 ns dual input pulse setup tabs y20 57 ns dual input pulse hold tabh y20 57 ns y: sampling clock (fsys/2) tabs tdc y c tabh a b 19a64(rev1.1)22-30
TMP19A64C1DXBG tmp19a64(rev1.1)-23-1 23. notations, precautions and restrictions 23.1 notations and terms (1) i/o register fields ar e often referred to as . for the interest of brevity. for example, trun.t0run means the t0run bit in the trun register. (2) fc, fsys, state fosc: clock supplied from the x1 and x2 pins fpll: clock generated by the on-chip pll fc: clock selected by the plloff pin fgear: clock selected by the syscr1.gear[1:0] bits fsys: clock selected by the syscr1.sysck bit the fsys cycle is referred to as a state. in addition, the clock selected by the syscr1.fpsel bit and the prescaler clock source selected by the syscr0.prck[1:0] bits are referred to as fperiph and t0 respectively. 23.2 precautions and restrictions (1) processor revision identifier the process revision identifier (prid) register in the tx19a core of the tmp19a64c1d contains 0x0000_2ca1. (2) bw0?bw1 pins the bw0 and bw1 pins must be connected to the dvcc2 pin to ensure that their signal levels do not fluctuate during chip operation. (3) oscillator warm-up counter if an external crystal is utilized, an interrupt signal programmed to bring the tmp1940cyaf out of stop mode triggers the on-chip warm-up counter. the system clock is not supplied to the on-chip logic until the warm-up counter expires. (4) programmable pullup resistors when port pins are configured as input ports, the integrated pull-up resistors can be enabled and disabled under software control. the pull-up resistors are not programmable when port pins are configured as output ports. the relevant port registers are pr ogrammed with the data resister. (5) external bus mastership the pin states while the bus is granted to an external device are described in chapter 7, i/o ports . (6) watchdog timer (wdt) upon reset, the wdt is enabled. if the watchdog timer function is not required, it must be disabled after reset. when relevant pins are configured as bus ar bitration signals, the i/o peripherals including the wdt can operate during exte rnal bus mastership. (7) a/d converter (adc) the ladder resistor network between the vrefh and vrefl pins can be disconnected under software control. this helps to reduce power dissipation, for example, in stop mode.
TMP19A64C1DXBG tmp19a64(rev1.1)-23-2 (8) undefined bits in i/o registers undefined i/o register bits are read as undefined states. therefore, software must be coded without relying on the states of any undefined bits. (9) electrostatic discharge (esd) sensitivity the following shows esd sensitivity. protect the device from static damage during device development or production stage. for a detailed description on esd, see general safety precautions and usage considerations. ? TMP19A64C1DXBG specification sensitivity machine model: mm 200 v human body model: hbm 1750v 2000 v ? tmp19a64f20axbg specification sensitivity machine model: mm 200 v human body model: hbm 2000v 2000 v (10) bus access of debug mode ( mask product only) bus accessing is abnormal for external function with sreq mode in debug mode, which means debug=?1? in cp0 register. of mask type mcu ,TMP19A64C1DXBG. pls don?t access to external function with sreq mode in debug mode.
TMP19A64C1DXBG tmp19a64(rev1.1)-23-3 (11) notations, precautions and restrictions overflow exception problem: if an overflow exception caused a jump to the exception handler and the first instruction in that exception handler caused another exception, the epc register should point to the address of the first instruction in the exception handler. however, the epc re gister might contain the address th at caused the overflow exception. ? problem-causing situation: when, with the instruction pipeline full, an overflow exception was taken at the following sequence of instructions and then the first instruction in the overflow exception handler causes another exception add, addi or sub <= # instruction that causes an overflow jump or branch instruction <= # instruction with a delay slot delay slot note: toshiba?s compiler uses no instructions that could cause an overflow. therefore, this problem does not occur. workaround: don?t place a jump or branch inst ruction immediately following an instruction that could cause an overflow (add, addi or sub).
TMP19A64C1DXBG tmp19a64(rev1.1)-23-4 lwl and lwr instructions problem: the lwl or lwr instruction might provide incorrect results. ? problem-causing situation #1: a. the destination of a load instruction (lb, lbu, lh, lhu, lw, lwl or lwr) is identical to that of the lwl or lwr instruction. b. the instruction pipeline is full. (the load in struction and the lwl or lwr instruction will be executed consecutively.) c. the dmac is programmed for data cache snooping. once the load instruction is executed, the dmac initiates a dma transaction. after it has been serviced, the lwl or lwr instruction is executed. this problem occurs when all of these conditions are true. ? problem-causing situation #2: a. the destination of a load instruction (lb, lbu, lh, lhu, lw, lwl or lwr) is identical to that of the lwl or lwr instruction. b. the doze or halt bit in the config register is set to 1 immediately before the load instruction. c. the instruction pipeline is full. (the load in struction and the lwl or lwr instruction will be executed consecutively.) d. after the load instruction is executed, the processor is put in the stop, sleep or idle mode. e. after an interrupt signaling brings the processor out of the stop, sleep or idle mode, the lwl or lwr instruction is executed. note: this applies to the case in which an interrupt signaling does not generate an interrupt upon exit from stop or idle mode. in other words, either the iec bit in the status register is cleared (interrupts disabled), or if the iec bit is set, the priority level of the incoming interrupt signaling is lower than the mask level programmed in the cmask field in the status register. (exit from stop, sleep or idle mode can be accomplished even with such settings.) this problem occurs when all of these conditions are true. workarounds: to use the lwl or lwr instruction, 1) place a nop between a load instructio n and the lwl or lwr instruction, or 2) disable the data cache snooping of the dmac be fore the lwl or lwr instruction is executed. also, do not put the processor in stop, s leep or idle mode before the lwl or lwr instruction is executed.
TMP19A64C1DXBG tmp19a64(rev1.1)-23-5 overflow exception when a dsu probe is used problem: it looks as if an overflow exception caused a jump to the reset and nonmaskable exception vector address (0xbfc0_0000). ? problem-causing situation: when an overflow exception occurs, with the processor connected to a dsu probe note: toshiba?s compiler uses no instructions that could cause an overflow. therefore, this problem does not occur. workaround: don?t place a jump or branch inst ruction immediately following an instruction that could cause an overflow (add, addi or sub). malfunction of using busreq signl in external bus access mode [condition] in external bus mode, using auto wait insert function (as same as +n wait) use external bus request signal function (busreq). for each target product,bus setting mode (multiplex/ separate) ale width(short/long) . please refer to following table. internal clock ale output (ale=1.5clk) rd output ( normal ) rd output (abnormal ) s0 s1 w1 w2 w3 s2 s3 trd spec not achieve because of 1 minus wait from original insert external bus request (busreq) when starting bus cycle (s0) s0 s1 w1 w2 s2 s3 (exp: ale band =1.5clk, auto wait = 3 )


▲Up To Search▲   

 
Price & Availability of TMP19A64C1DXBG

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X